mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Correct module definition in the browser
The previous logic was preventing modules being executed that weren't baked into a script tag.
This commit is contained in:
parent
94287c9ac3
commit
0a37f6bf5b
@ -594,8 +594,8 @@ $tw.Wiki.prototype.defineTiddlerModules = function() {
|
|||||||
if(tiddler.hasField("module-type")) {
|
if(tiddler.hasField("module-type")) {
|
||||||
switch (tiddler.fields.type) {
|
switch (tiddler.fields.type) {
|
||||||
case "application/javascript":
|
case "application/javascript":
|
||||||
// We don't need to register JavaScript tiddlers in the 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.browser) {
|
if(!$tw.utils.hop($tw.modules.titles,tiddler.fields.title)) {
|
||||||
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text);
|
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user