Procházet zdrojové kódy

HUE-9066 [frontend] Prevent history panel from opening gist links

Johan Ahlen před 6 roky
rodič
revize
325639e22a

+ 1 - 1
desktop/core/src/desktop/js/apps/notebook/editorViewModel.js

@@ -594,7 +594,7 @@ class EditorViewModel {
         {
           type: editorType || options.editor_type,
           directory_uuid: window.location.getParameter('directory_uuid'),
-          gist: window.location.getParameter('gist')
+          gist: self.isNotificationManager() ? undefined : window.location.getParameter('gist')
         },
         data => {
           self.loadNotebook(data.notebook);

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

@@ -356,7 +356,7 @@ class EditorViewModel {
       $.post('/notebook/api/create_notebook', {
         type: editorType || this.editorType(),
         directory_uuid: window.location.getParameter('directory_uuid'),
-        gist: window.location.getParameter('gist')
+        gist: this.isNotificationManager() ? undefined : window.location.getParameter('gist')
       })
         .then(data => {
           this.loadNotebook(data.notebook);