From 7e4722f07a81fadc419738d2c2a55a090a830f8c Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Wed, 25 May 2022 18:08:08 +0100 Subject: [PATCH] Fix crash with missing palette tiddler --- core/modules/editor/engines/framed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 6cc50896f..957a9156e 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -35,7 +35,7 @@ function FramedEngine(options) { this.iframeDoc = this.iframeNode.contentWindow.document; // (Firefox requires us to put some empty content in the iframe) var paletteTitle = this.widget.wiki.getTiddlerText("$:/palette"); - var colorScheme = this.widget.wiki.getTiddler(paletteTitle).fields["color-scheme"] || "light"; + var colorScheme = (this.widget.wiki.getTiddler(paletteTitle) || {fields: {}}).fields["color-scheme"] || "light"; this.iframeDoc.open(); this.iframeDoc.write(""); this.iframeDoc.close();