Преглед изворни кода

HUE-9107 [editor] Fix history update after existing presentation mode in editor v2

Johan Ahlen пре 6 година
родитељ
комит
c5fb9b41af
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      desktop/core/src/desktop/js/apps/notebook2/editorViewModel.js

+ 2 - 1
desktop/core/src/desktop/js/apps/notebook2/editorViewModel.js

@@ -25,6 +25,7 @@ import hueUtils from 'utils/hueUtils';
 
 import Notebook from 'apps/notebook2/notebook';
 import Snippet from 'apps/notebook2/snippet';
+import { UPDATE_HISTORY_EVENT } from 'apps/notebook2/components/ko.queryHistory';
 
 class EditorViewModel {
   constructor(editorId, notebooks, options, CoordinatorEditorViewModel, RunningCoordinatorModel) {
@@ -52,7 +53,7 @@ class EditorViewModel {
       this.editorMode(newVal !== 'notebook');
       hueUtils.changeURLParameter('type', newVal);
       if (this.editorMode()) {
-        this.selectedNotebook().fetchHistory(); // Js error if notebook did not have snippets
+        huePubSub.publish(UPDATE_HISTORY_EVENT);
       }
     });
     this.preEditorTogglingSnippet = ko.observable();