mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
undefined check for obj. descriptor
This commit is contained in:
parent
39625aacaa
commit
476657ecad
@ -1102,12 +1102,17 @@ 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);
|
||||
continue;
|
||||
}
|
||||
|
||||
copy = descriptor.value;
|
||||
if (descriptor !== undefined) {
|
||||
if (descriptor.get || descriptor.set) {
|
||||
Object.defineProperty(target, name, descriptor);
|
||||
continue;
|
||||
}
|
||||
|
||||
copy = descriptor.value;
|
||||
} else {
|
||||
$.console.warn('Undefined descriptior obtained for the "' + name + '" property in extended object.');
|
||||
}
|
||||
|
||||
// Prevent never-ending loop
|
||||
if ( target === copy ) {
|
||||
|
Loading…
Reference in New Issue
Block a user