Skip to content

Commit 013e26a

Browse files
committed
Initialize cell metadata
1 parent afd27ef commit 013e26a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/notebook.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ export class RNotebookProvider implements vscode.NotebookContentProvider, vscode
300300

301301
if (notebook) {
302302
try {
303+
if (cell.metadata === undefined) {
304+
cell.metadata = {};
305+
}
306+
303307
cell.metadata.runState = vscode.NotebookCellRunState.Running;
304308
const start = +new Date();
305309
cell.metadata.runStartTime = start;

0 commit comments

Comments
 (0)