Skip to content

Commit

Permalink
Strict null handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Silvester committed Dec 23, 2019
1 parent c26c8cc commit b273d31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/console-extension/src/index.ts
Expand Up @@ -40,7 +40,7 @@ import { IRenderMimeRegistry } from '@jupyterlab/rendermime';

import { find } from '@lumino/algorithm';

import { JSONObject, ReadonlyPartialJSONObject, UUID } from '@lumino/coreutils';
import { JSONExt, JSONObject, ReadonlyPartialJSONObject, UUID, ReadonlyJSONValue } from '@lumino/coreutils';

import { DisposableSet } from '@lumino/disposable';

Expand Down Expand Up @@ -194,7 +194,7 @@ async function activateConsole(
category: 'Console',
rank,
kernelIconUrl,
metadata: { kernel: spec.metadata }
metadata: { kernel: JSONExt.deepCopy(spec.metadata || {}) as ReadonlyJSONValue }
})
);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/notebook-extension/src/index.ts
Expand Up @@ -32,7 +32,7 @@ import { IDocumentManager } from '@jupyterlab/docmanager';

import { ArrayExt } from '@lumino/algorithm';

import { UUID, JSONObject, ReadonlyPartialJSONObject } from '@lumino/coreutils';
import { UUID, JSONExt, JSONObject, ReadonlyPartialJSONObject, ReadonlyJSONValue } from '@lumino/coreutils';

import { DisposableSet } from '@lumino/disposable';

Expand Down Expand Up @@ -738,7 +738,7 @@ function activateNotebookHandler(
category: 'Notebook',
rank,
kernelIconUrl,
metadata: { kernel: spec.metadata }
metadata: { kernel: JSONExt.deepCopy(spec.metadata || {}) as ReadonlyJSONValue }
})
);
}
Expand Down

0 comments on commit b273d31

Please sign in to comment.