Cosmetics...

This commit is contained in:
Eric van der Vlist 2021-05-02 00:06:36 +02:00
parent f1060d6007
commit b62623370a
1 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@
*/
/*
* Shortcuts aka imports
* Shortcuts (aka imports)
*/
out = Packages.java.lang.System.out;
CommonsOperationsUtil = Packages.ro.sync.ecss.extensions.commons.operations.CommonsOperationsUtil;
@ -17,6 +17,7 @@ CommonsOperationsUtil = Packages.ro.sync.ecss.extensions.commons.operations.Comm
*
*/
require = function (filepath) {
// Check if the object has been initialized
if (Object.keys(require).length == 0) {
var currentPath = CommonsOperationsUtil.expandAndResolvePath(authorAccess, 'commons.js');
@ -25,6 +26,7 @@ require = function (filepath) {
};
require.urisSet[currentPath] = true;
}
var currentFilePath = require.urisStack[require.urisStack.length - 1];
var currentURI = new java.net.URI(currentFilePath);
var targetURI = currentURI.resolve(filepath);
@ -40,4 +42,3 @@ require = function (filepath) {
require.urisStack.pop();
}
}