Skip to content

Commit

Permalink
Merge branch 'master' of github.com:SteveSanderson/knockout-es5
Browse files Browse the repository at this point in the history
  • Loading branch information
archangel-irk committed Apr 27, 2016
2 parents fdefe26 + 806ae9b commit 72f67aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/knockout-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ void function(global, undefined_, undefined){
define(Object, namedFunction('getOwnPropertyNames', function getOwnPropertyNames(obj){
// gh-43
var coercedObj = Object(obj), props;
if (coercedObj.toString() === '[object Window]') {
if ('toString' in coercedObj && coercedObj.toString() === '[object Window]') {
try {
props = getProps(obj);
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion dist/knockout-es5.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ return b._name=a,b}function g(a){function b(b,e){return e||2===arguments.length?
// common per-object storage area made visible by patching getOwnPropertyNames'
return d(Object,f("getOwnPropertyNames",function(a){
// gh-43
var b,c=Object(a);if("[object Window]"===c.toString())try{b=h(a)}catch(d){b=i}else b=h(a);return m.call(a,k)&&b.splice(b.indexOf(k),1),b})),d(a.prototype,f("get",function(a){return this.unlock(a).value})),d(a.prototype,f("set",function(a,b){this.unlock(a).value=b})),a}(),p=function(g){function h(b){return this===a||null==this||this===h.prototype?new h(b):(p(this,new o),void r(this,b))}function i(a){n(a);var d=q(this).get(a);return d===b?c:d}function j(a,d){n(a),
var b,c=Object(a);if("toString"in c&&"[object Window]"===c.toString())try{b=h(a)}catch(d){b=i}else b=h(a);return m.call(a,k)&&b.splice(b.indexOf(k),1),b})),d(a.prototype,f("get",function(a){return this.unlock(a).value})),d(a.prototype,f("set",function(a,b){this.unlock(a).value=b})),a}(),p=function(g){function h(b){return this===a||null==this||this===h.prototype?new h(b):(p(this,new o),void r(this,b))}function i(a){n(a);var d=q(this).get(a);return d===b?c:d}function j(a,d){n(a),
// store a token for explicit undefined so that "has" works correctly
q(this).set(a,d===c?b:d)}function k(a){return n(a),q(this).get(a)!==c}function l(a){n(a);var b=q(this),d=b.get(a)!==c;return b.set(a,c),d}function m(){return q(this),"[object WeakMap]"}var n=function(a){if(null==a||"object"!=typeof a&&"function"!=typeof a)throw new TypeError("Invalid WeakMap key")},p=function(a,b){var c=g.unlock(a);if(c.value)throw new TypeError("Object is already a WeakMap");c.value=b},q=function(a){var b=g.unlock(a).value;if(!b)throw new TypeError("WeakMap is not generic");return b},r=function(a,b){null!==b&&"object"==typeof b&&"function"==typeof b.forEach&&b.forEach(function(c,d){c instanceof Array&&2===c.length&&j.call(a,b[d][0],b[d][1])})};
// Undo the function-name stripping that UglifyJS does
Expand Down
2 changes: 1 addition & 1 deletion lib/weakmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void function(global, undefined_, undefined){
define(Object, namedFunction('getOwnPropertyNames', function getOwnPropertyNames(obj){
// gh-43
var coercedObj = Object(obj), props;
if (coercedObj.toString() === '[object Window]') {
if ('toString' in coercedObj && coercedObj.toString() === '[object Window]') {
try {
props = getProps(obj);
} catch (e) {
Expand Down

0 comments on commit 72f67aa

Please sign in to comment.