1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Fixed boot so module line numbers are correct again (#7618)

This commit is contained in:
Cameron Fischer 2023-07-20 11:13:36 -04:00 committed by GitHub
parent 9b2af13596
commit 98ff6b67fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -596,11 +596,11 @@ $tw.utils.evalGlobal = function(code,context,filename,sandbox,allowGlobals) {
// Add the code prologue and epilogue // Add the code prologue and epilogue
code = [ code = [
"(function(" + contextNames.join(",") + ") {", "(function(" + contextNames.join(",") + ") {",
" (function(){\n" + code + "\n;})();", " (function(){" + code + "\n;})();\n",
(!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "", (!$tw.browser && sandbox && !allowGlobals) ? globalCheck : "",
" return exports;\n", "\nreturn exports;\n",
"})" "})"
].join("\n"); ].join("");
// Compile the code into a function // Compile the code into a function
var fn; var fn;