mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-10 11:59:58 +00:00
Fix problem with JavaScript module tiddlers that are named as system tiddlers
Reported by @boycook
This commit is contained in:
parent
53a23cae5c
commit
f28684d249
@ -551,7 +551,10 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
|
||||
if(!moduleInfo.exports) {
|
||||
try {
|
||||
// Check the type of the definition
|
||||
if(typeof moduleInfo.definition === "string") { // String
|
||||
if(typeof moduleInfo.definition === "function") { // Function
|
||||
moduleInfo.exports = {};
|
||||
moduleInfo.definition(moduleInfo,moduleInfo.exports,sandbox.require);
|
||||
} else if(typeof moduleInfo.definition === "string") { // String
|
||||
moduleInfo.exports = $tw.utils.evalSandboxed(moduleInfo.definition,sandbox,tiddler.fields.title);
|
||||
} else { // Object
|
||||
moduleInfo.exports = moduleInfo.definition;
|
||||
|
Loading…
Reference in New Issue
Block a user