Compare commits

...

4 Commits

Author SHA1 Message Date
Ian Gilman
ed66c2d151 Changelog for #2212 2022-10-24 14:17:51 -07:00
Ian Gilman
af564547f0
Merge pull request #2212 from joedf/regression-fix-2201
Undefined check for object descriptor
2022-10-24 14:16:21 -07:00
Joe DF
aec24d6dd7 add continue, update warning msg 2022-10-19 16:07:35 -04:00
Joe DF
476657ecad undefined check for obj. descriptor 2022-10-10 15:12:30 -04:00
2 changed files with 11 additions and 5 deletions

View File

@ -13,7 +13,7 @@ OPENSEADRAGON CHANGELOG
* Fixed: Cropping tiled images with polygons was broken (#2183 @altert) * Fixed: Cropping tiled images with polygons was broken (#2183 @altert)
* Fixed: Disabling buttons only changed their appearance, but they were still clickable (#2187 @pearcetm) * Fixed: Disabling buttons only changed their appearance, but they were still clickable (#2187 @pearcetm)
* Fixed: ImageTileSource produced an error having to do with getTileHashKey (#2190 @Aiosa) * Fixed: ImageTileSource produced an error having to do with getTileHashKey (#2190 @Aiosa)
* Fixed: On startup you would get an unnecessary "Viewer.buttons is deprecated" warning (#2201 @joedf, #2219 @jssullivan) * Fixed: On startup you would get an unnecessary "Viewer.buttons is deprecated" warning (#2201 @joedf, #2219 @jssullivan, #2212 @joedf)
3.1.0: 3.1.0:

View File

@ -1102,12 +1102,18 @@ 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('Could not copy inherited property "' + name + '".');
continue;
}
// Prevent never-ending loop // Prevent never-ending loop
if ( target === copy ) { if ( target === copy ) {