openhab / org.openhab.ui.habpanel

OUTDATED repo - HABPanel has moved to the openhab-webui repo!
https://github.com/openhab/openhab-webui
Eclipse Public License 1.0
97 stars 93 forks source link

Chart Widget, "use strict" rule violation in chart.widget.js #107

Closed tseiman closed 7 years ago

tseiman commented 7 years ago

Hello, as reported here: https://community.openhab.org/t/habpanel-chart-widget-bug-macos-safari-chrome/19327

the chart widget is not working under MacOS - Safari/Chrome. The error message on the console is:

SyntaxError: Strict mode does not allow function declarations in a lexically nested statement.

I commented out the "use strict" as "quick and dirty" solution - and it works then - however might be better to fix it so "use strict" can be used. I have unfortunately not the time/knowledge to fix this and bring a patch or something - sorry.

Thanks BR ThomasS

ghys commented 7 years ago

There are indeed nested inline functions in that code, introduced with the live update PR, should be sanitized easily. I'll have a fix soon but will test on an Apple device (which I don't have at home) before merging it.