From 7c9ec3b780a92e8eee690dd0eea1062f003493d2 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Tue, 19 Mar 2024 01:30:37 +1100 Subject: [PATCH] Remove unwanted vscode property when not required --- extensions/ipynb/src/serializers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/ipynb/src/serializers.ts b/extensions/ipynb/src/serializers.ts index 27c45bce918b8..ce43bbae3fc64 100644 --- a/extensions/ipynb/src/serializers.ts +++ b/extensions/ipynb/src/serializers.ts @@ -73,9 +73,9 @@ function createCodeCellFromNotebookCell(cell: NotebookCellData, preferredLanguag languageId: cell.languageId } }; - } else { + } else if (metadata.vscode) { // cell current language is the same as the preferred cell language in the document, flush the vscode custom language id metadata - metadata.vscode = undefined; + delete metadata.vscode; } const codeCell: any = {