diff --git a/js/jupyterlab-slideshow/src/notebook/presenter.ts b/js/jupyterlab-slideshow/src/notebook/presenter.ts index 42ce2a7..56f3930 100644 --- a/js/jupyterlab-slideshow/src/notebook/presenter.ts +++ b/js/jupyterlab-slideshow/src/notebook/presenter.ts @@ -411,7 +411,7 @@ export class NotebookPresenter implements IPresenter { panel.content.activeCellIndex = moveTo; } else if (fromExtentAlternate != null) { let moveTo = fromExtentAlternate; - if (['back', 'forward'].includes(direction)) { + if (alternate && ['back', 'forward'].includes(alternate)) { moveTo = this._slideBackup(extents, activeCellIndex, fromExtentAlternate); } panel.content.activeCellIndex = moveTo;