Browse Source

[oozie] Fix JS error on overlay remove

Enrico Berti 11 years ago
parent
commit
6299119a23
1 changed files with 3 additions and 1 deletions
  1. 3 1
      apps/oozie/src/oozie/templates/editor/workflow_editor.mako

+ 3 - 1
apps/oozie/src/oozie/templates/editor/workflow_editor.mako

@@ -1628,7 +1628,9 @@ ${ dashboard.import_bindings() }
   function addActionDemiModalFieldCancel() {
     $("#exposeOverlay").fadeOut(300);
     $("#addActionDemiModal").modal("hide");
-    viewModel.removeWidgetById(viewModel.newAction().id());
+    if (viewModel.newAction()){
+      viewModel.removeWidgetById(viewModel.newAction().id());
+    }
     viewModel.newAction(null);
   }