mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Fix for Chrome (v 45) issue that key is sometimes undefined outside of the for-in loop.
This commit is contained in:
parent
bb2910673a
commit
fc8b4db796
@ -805,10 +805,12 @@ if (typeof define === 'function' && define.amd) {
|
||||
// Own properties are enumerated firstly, so to speed up,
|
||||
// if last one is own, then all properties are own.
|
||||
|
||||
var key;
|
||||
for ( key in obj ) {}
|
||||
var lastKey;
|
||||
for (var key in obj ) {
|
||||
lastKey = key;
|
||||
}
|
||||
|
||||
return key === undefined || hasOwn.call( obj, key );
|
||||
return lastKey === undefined || hasOwn.call( obj, lastKey );
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user