Skip to content

Commit 98449d6

Browse files
Adapt metadata field access deprecation to accessor function
1 parent 2548d49 commit 98449d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webio_jupyter_extension/webio-jupyter-labextension/labextension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class WebIONotebookManager {
230230
if (!this.notebook.model) {
231231
throw new Error("Notebook model is not available!");
232232
}
233-
return (this.notebook.model.metadata.get(WEBIO_METADATA_KEY) || {}) as any;
233+
return (this.notebook.model.getMetadata(WEBIO_METADATA_KEY) || {}) as any;
234234
}
235235

236236
private setWebIOMetadata(kernelId: string, commId: string) {
@@ -242,7 +242,7 @@ class WebIONotebookManager {
242242
if (!this.notebook.model) {
243243
throw new Error("Notebook model is not available!");
244244
}
245-
this.notebook.model.metadata.set(WEBIO_METADATA_KEY, metadata as any);
245+
this.notebook.model.setMetadata(WEBIO_METADATA_KEY, metadata as any);
246246
}
247247
}
248248

0 commit comments

Comments
 (0)