diff --git a/marko/page/data/components/change/component.js b/marko/page/data/components/change/component.js index 1c28257..8277a8c 100644 --- a/marko/page/data/components/change/component.js +++ b/marko/page/data/components/change/component.js @@ -65,8 +65,8 @@ module.exports = class { this.state.operation += " chapter" this.state.links = [{ - text: chapter.title || `Untitled chapter (${chapterKey.id})`, - href: `/story/${storyKey.id}#${chapterKey.id}`, + text: (chapter||{}).title || `Untitled chapter (${(chapterKey||chapter).id})`, + href: `/story/${storyKey.id}#${(chapterKey||chapter).id}`, }] break