New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined check for object descriptor #2212
Conversation
Interesting! So this must be when one of the objects passed into How are you getting this to happen? The only place in OSD I'm aware of there being a |
I didn't think I was... I also have Not sure if this helps, but I am using the js-inheritance script from John Resig, and additionally jQuery. The reason will still do is that the application pretty old... it is maintained by me, but haven't change some dependencies because we had the requirement to support IE11, but that should be no longer soon enough. |
Hmm... I'm not getting it when I run the basic test (https://github.com/openseadragon/openseadragon/blob/master/test/demo/basic.html), so there must be something different in how you're running it. Are you subclassing any of the OSD classes? It seems like it might be worth knowing what's causing this before we merge the fix. |
Not sure, the only "weird" and not best practice stuff I can think of would be overriding:
this.osdMouseTracker = new OpenSeadragon.MouseTracker({
element: this.canvas,
releaseHandler: this.osdViewer.innerTracker.releaseHandler,
dragHandler: this.osdViewer.innerTracker.dragHandler,
dragEndHandler: this.osdViewer.innerTracker.dragEndHandler,
scrollHandler: this.osdViewer.innerTracker.scrollHandler
});
this.osdMouseTracker.setTracking(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, this seems like a good fix.
I guess the existence of this warning means you'll be getting it in your app all the time. Are you okay with that?
Yeah, I think that's okay. If not, I can always locally build and remove the warning for my own use if I find it too noisy in the console. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fair. Let's go with this. Thank you for the fix!
The new fix #2201 has broken my OpenSeadragon application. I realized we should have an 'undefined" check for
Object.getOwnPropertyDescriptor()
. This fixes the issue and logs a warning when it is undefined.I get the warning for
removeItem
in my application. I'll have to look into it on my own at some point, but at least this can go in for now. It looks likename
= "removeItem" andoptions
is an array of length 0...Perhaps, there should be a check for
options.length
= 0?Comments?