diff --git a/src/polyglot-notebooks-vscode-common/src/metadataUtilities.ts b/src/polyglot-notebooks-vscode-common/src/metadataUtilities.ts index d5685072ba..4c7129586a 100644 --- a/src/polyglot-notebooks-vscode-common/src/metadataUtilities.ts +++ b/src/polyglot-notebooks-vscode-common/src/metadataUtilities.ts @@ -96,7 +96,7 @@ export function getNotebookCellMetadataFromNotebookCellElement(notebookCell: vsc export function getNotebookDocumentMetadataFromInteractiveDocument(interactiveDocument: commandsAndEvents.InteractiveDocument): NotebookDocumentMetadata { const notebookMetadata = createDefaultNotebookDocumentMetadata(); - const kernelInfo = interactiveDocument.metadata.kernelInfo; + const kernelInfo = interactiveDocument.metadata.kernelInfo || interactiveDocument.metadata.plyglot_notebook.kernelInfo if (typeof kernelInfo === 'object') { if (typeof kernelInfo.defaultKernelName === 'string') { notebookMetadata.kernelInfo.defaultKernelName = kernelInfo.defaultKernelName;