From bb2ccf6f4b9cb492fee891b7ac0a021f30d45b4f Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sun, 25 Aug 2019 16:01:05 +0200 Subject: [PATCH] Fixed chapter moves crashing history page due to changes in change reporting in 2.0. --- marko/page/data/components/change/component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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