From 0a37f6bf5b66a247e39371c85a554c06e7f64e22 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 10 Apr 2013 16:56:17 +0100 Subject: [PATCH] Correct module definition in the browser The previous logic was preventing modules being executed that weren't baked into a script tag. --- boot/boot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 6c01d5e57..e4174b700 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -594,8 +594,8 @@ $tw.Wiki.prototype.defineTiddlerModules = function() { if(tiddler.hasField("module-type")) { switch (tiddler.fields.type) { case "application/javascript": - // We don't need to register JavaScript tiddlers in the browser - if(!$tw.browser) { + // We only define modules that haven't already been defined, because in the browser modules in system tiddlers are defined in inline script + if(!$tw.utils.hop($tw.modules.titles,tiddler.fields.title)) { $tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text); } break;