mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-28 16:16:08 +03:00
Merge pull request #2212 from joedf/regression-fix-2201
Undefined check for object descriptor
This commit is contained in:
commit
af564547f0
@ -1102,12 +1102,18 @@ function OpenSeadragon( options ){
|
||||
// Extend the base object
|
||||
for ( name in options ) {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(options, name);
|
||||
|
||||
if (descriptor !== undefined) {
|
||||
if (descriptor.get || descriptor.set) {
|
||||
Object.defineProperty(target, name, descriptor);
|
||||
continue;
|
||||
}
|
||||
|
||||
copy = descriptor.value;
|
||||
} else {
|
||||
$.console.warn('Could not copy inherited property "' + name + '".');
|
||||
continue;
|
||||
}
|
||||
|
||||
// Prevent never-ending loop
|
||||
if ( target === copy ) {
|
||||
|
Loading…
Reference in New Issue
Block a user