Update null check

This commit is contained in:
David Sheiles
2019-02-28 17:57:05 +11:00
parent d3fb614d25
commit f0caa6be4b

View File

@@ -32,7 +32,7 @@ function navigationService($routeParams, $location, $q, $timeout, $injector, eve
var currentEditorState = editorState.getCurrent()
console.log("currentEditorState", currentEditorState);
if (currentEditorState != null && currentEditorState.id === args.node.id) {
if (currentEditorState && currentEditorState.id === args.node.id) {
//current page is loaded, so navigate to root
var section = appState.getSectionState("currentSection");
$location.path("/" + section);