mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 22:26:10 +03:00
Merge pull request #2212 from joedf/regression-fix-2201
Undefined check for object descriptor
This commit is contained in:
commit
af564547f0
@ -1102,13 +1102,19 @@ function OpenSeadragon( options ){
|
||||
// Extend the base object
|
||||
for ( name in options ) {
|
||||
var descriptor = Object.getOwnPropertyDescriptor(options, name);
|
||||
if (descriptor.get || descriptor.set) {
|
||||
Object.defineProperty(target, name, descriptor);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
copy = descriptor.value;
|
||||
|
||||
// Prevent never-ending loop
|
||||
if ( target === copy ) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user