Update bundle.js

When absolute path do not calculate path with join
This commit is contained in:
Luis Tejeda
2022-05-30 13:13:52 -05:00
parent 6d3afb2f60
commit e2ed7f09f3

View File

@@ -47,6 +47,9 @@ function comparePaths(path1, path2) {
* @returns {object} - Detect root files result object * @returns {object} - Detect root files result object
*/ */
function calculatePath(parentFileName, referencePath) { function calculatePath(parentFileName, referencePath) {
if (path.isAbsolute(referencePath)) {
return referencePath;
}
if (referencePath[0] === localPointer) { if (referencePath[0] === localPointer) {
return `${parentFileName}${referencePath}`; return `${parentFileName}${referencePath}`;
} }