kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Prioritize "module.exports" over "exports" in require sandbox
(Node-ism, inherited (temporarily?) to support codemirror upgrade)print-window-tiddler
rodzic
51f54b06f9
commit
6b03789e06
|
@ -677,6 +677,9 @@ $tw.modules.execute = function(moduleName,moduleRoot) {
|
|||
} else if(typeof moduleInfo.definition === "string") { // String
|
||||
moduleInfo.exports = _exports;
|
||||
$tw.utils.evalSandboxed(moduleInfo.definition,sandbox,tiddler.fields.title);
|
||||
if(sandbox.module.exports) {
|
||||
moduleInfo.exports = sandbox.module.exports; //more codemirror workaround
|
||||
}
|
||||
} else { // Object
|
||||
moduleInfo.exports = moduleInfo.definition;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue