diff --git a/src/openseadragon.js b/src/openseadragon.js index 90823428..1a9c79de 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -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;