Elm 0.19rc1 Browser.Debugger throws errors repeatedly when trying to open a popup if the browser (Chrome/Safari) is configured to block popups.
The problem is in _Debugger_openWindow
on line 180. window.open()
can return null for reasons, one of which being that the browser is blocking popups. On line 181 the value is used without checking for null.
Steps to reproduce:
- Make sure that your browser is blocking popups:
- on Safari, open Preferences -> Security -> check 'Block pop-up windows'
- on Chrome, open Preferences -> search for "popups" -> click "Content Settings" -> click "Popups" -> adjust settings
elm make Main.elm --debug
- open index.html
- click "Explore History" in the corner
- check the JS console to observes 100s/1000s of errors being logged