Permalink
Browse files

fix(toJs): fix "Cannot read property 'ctor' of null"

Apparently `typeof null` is `"object"`!

Reported by @simonh1000 on Discourse [1].

[1]: https://discourse.elm-lang.org/t/elm-remotedev-elm-redux-devtools-extension-integration/996/6
  • Loading branch information...
utkarshkukreti committed Mar 24, 2018
1 parent 97bde04 commit 0860430fc0c12b0fac7d8506d42a5264f764d9e0
Showing with 2 additions and 2 deletions.
  1. +1 −1 dist/main.js
  2. +1 −1 src/index.js
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -11,7 +11,7 @@ const toAction = msg => {
};
const toJs = model => {
if (typeof model === 'object') {
if (model && typeof model === 'object') {
switch (model.ctor) {
// Empty List.
case '[]':

0 comments on commit 0860430

Please sign in to comment.