Skip to content

Commit

Permalink
FIX Error "cannot convert undefined or null to object" when no inline…
Browse files Browse the repository at this point in the history
… editable forms are loaded yet
  • Loading branch information
robbieaverill committed Jul 15, 2019
1 parent f7ccc45 commit 707cd95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/src/legacy/ElementEditor/entwine.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jQuery.entwine('ss', ($) => {

// We can introspect the store to find form names in the `element` namespace
store.dispatch(destroy(
...Object.keys(store.getState().form.formState.element).map(name => `element.${name}`)
...Object.keys(store.getState().form.formState.element || {}).map(name => `element.${name}`)
));
}, 0);
}
Expand Down

0 comments on commit 707cd95

Please sign in to comment.