mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 00:26:10 +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
|
// Extend the base object
|
||||||
for ( name in options ) {
|
for ( name in options ) {
|
||||||
var descriptor = Object.getOwnPropertyDescriptor(options, name);
|
var descriptor = Object.getOwnPropertyDescriptor(options, name);
|
||||||
|
|
||||||
|
if (descriptor !== undefined) {
|
||||||
if (descriptor.get || descriptor.set) {
|
if (descriptor.get || descriptor.set) {
|
||||||
Object.defineProperty(target, name, descriptor);
|
Object.defineProperty(target, name, descriptor);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
copy = descriptor.value;
|
copy = descriptor.value;
|
||||||
|
} else {
|
||||||
|
$.console.warn('Undefined descriptior obtained for the "' + name + '" property in extended object.');
|
||||||
|
}
|
||||||
|
|
||||||
// Prevent never-ending loop
|
// Prevent never-ending loop
|
||||||
if ( target === copy ) {
|
if ( target === copy ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user