Skip to content

Commit 45094d9

Browse files
Backport PR #7567: Fix undefined error when checkpoints is empty (#7568)
Co-authored-by: J. David Ibáñez <jdavid.ibp@gmail.com>
1 parent edfa5e2 commit 45094d9

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)