From db35bc36aaff23643d0abea247c70fea97bedd56 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 10 Mar 2014 18:41:11 +0000 Subject: [PATCH] Disable storyviews when rendering to the fake dom --- core/modules/utils/fakedom.js | 1 + core/modules/widgets/list.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 16181fee5..3904f95b0 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -219,6 +219,7 @@ var document = { createTextNode: function(text) { return new TW_TextNode(text); }, + isTiddlyWikiFakeDom: true }; exports.fakeDocument = document; diff --git a/core/modules/widgets/list.js b/core/modules/widgets/list.js index eef444109..9da599f89 100755 --- a/core/modules/widgets/list.js +++ b/core/modules/widgets/list.js @@ -43,7 +43,11 @@ ListWidget.prototype.render = function(parent,nextSibling) { this.renderChildren(parent,nextSibling); // Construct the storyview var StoryView = this.storyViews[this.storyViewName]; - this.storyview = StoryView ? new StoryView(this) : null; + if(StoryView && !this.document.isTiddlyWikiFakeDom) { + this.storyview = new StoryView(this) + } else { + this.storyview = null; + } }; /*