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,13 +1102,19 @@ 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.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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
copy = descriptor.value;
|
|
||||||
|
|
||||||
// Prevent never-ending loop
|
// Prevent never-ending loop
|
||||||
if ( target === copy ) {
|
if ( target === copy ) {
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user