From 8735ebc8bfb7a29dfddef7a121e86cbac96c1e09 Mon Sep 17 00:00:00 2001 From: rebornix Date: Tue, 22 Sep 2020 08:48:40 -0700 Subject: [PATCH] fix #107210. --- .../contrib/notebook/common/model/notebookTextModel.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts b/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts index b1d030fb632..3369f353b3c 100644 --- a/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts +++ b/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts @@ -559,6 +559,15 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel } private _customMetadataEqual(a: any, b: any) { + if (!a && !b) { + // both of them are nullish or undefined + return true; + } + + if (!a || !b) { + return false; + } + const aProps = Object.getOwnPropertyNames(a); const bProps = Object.getOwnPropertyNames(b);