openhab / openhab-js

openHAB JavaScript Library for JavaScript Scripting Automation
https://www.openhab.org/addons/automation/jsscripting/
Eclipse Public License 2.0
38 stars 31 forks source link

[time] Fix `toZDT` fails when injection caching is enabled because instanceof checks don't work #312

Closed florian-h05 closed 6 months ago

florian-h05 commented 6 months ago

Fixes #288.

When time.toZDT got a time.ZonedDateTime passed in from an external library, it failed to recognize that it in fact got a time.ZonedDateTime because instanceof checks were not working due to the webpack settings for the injection caching.

Also fixes utils.isJsInstanceOfJava not working and renames utils.isJsInstanceOfJava to utils.isJsInstanceOfJavaType.