Browse Source

Merge pull request #46 from JohanMabille/restore

Fixed debugger restore
Jeremy Tuloup 5 năm trước cách đây
mục cha
commit
a51a7770d1
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/index.ts

+ 3 - 1
src/index.ts

@@ -20,6 +20,8 @@ import { IEditorTracker } from '@jupyterlab/fileeditor';
 
 import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook';
 
+import { UUID } from '@phosphor/coreutils';
+
 import { Debugger } from './debugger';
 
 import { IDebugger, IDebuggerSidebar } from './tokens';
@@ -215,7 +217,7 @@ const tracker: JupyterFrontEndPlugin<IDebugger> = {
     app.commands.addCommand(command, {
       label: 'Debugger',
       execute: args => {
-        const id = (args.id as string) || '';
+        const id = (args.id as string) || UUID.uuid4();
         if (id) {
           console.log('Debugger ID: ', id);
         }