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();