Skip to content

Commit e01370e

Browse files
jdavidmeeseeksmachine
authored andcommitted
Backport PR #7567: Fix undefined error when checkpoints is empty
1 parent edfa5e2 commit e01370e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/notebook-extension/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const checkpoints: JupyterFrontEndPlugin<void> = {
124124
context?.fileChanged.connect(onChange);
125125

126126
const checkpoints = await context?.listCheckpoints();
127-
if (!checkpoints) {
127+
if (!checkpoints || !checkpoints.length) {
128128
return;
129129
}
130130
const checkpoint = checkpoints[checkpoints.length - 1];

0 commit comments

Comments
 (0)