Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upException when native submodules of Window present #397
Comments
colinmccabe
referenced this issue
Sep 8, 2015
Closed
Fix exceptions when native submodules of Window present #398
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
jvoigtlaender
Jan 19, 2016
Contributor
Since there is a pull request addressing this issue, I am closing the issue itself.
|
Since there is a pull request addressing this issue, I am closing the issue itself. |
jvoigtlaender
closed this
Jan 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
colinmccabe commentedSep 8, 2015
When:
Window(for example,Window.Foo) is used in an appWindow.Foocontains native code (i.e. it has aNative.Window.Foo)Windowitself is used nowhere in the appan exception occurs in
Runtime.js:Uncaught TypeError: Cannot read property 'resizeIfNeeded' of undefinedHere are the relevant lines:
https://github.com/elm-lang/core/blob/2.1.0/src/Native/Runtime.js#L423
https://github.com/elm-lang/core/blob/2.1.0/src/Native/Runtime.js#L434
The problem is that
elm.Native.Windowis defined because of the presence of the native submodule, butelm.Native.Window.valuesis undefined because theWindowmodule itself is not used in the app. An exception might occur in either of the two if conditions.I stumbled upon this while writing a library. Any library (or future version of core) that defines a module under
Windowmight encounter this issue.