Fix resourcePath() null bug. Fix #219

This commit is contained in:
Folyd 2022-12-10 16:19:39 +08:00
parent c37183a876
commit a5e5998501

View file

@ -89,9 +89,15 @@ function getVar(name) {
return dataVar.value;
}
}
return null
return null;
}
function resourcePath(basename, extension) {
return getVar("root-path") + basename + getVar("resource-suffix") + extension
let rootPath = getVar("root-path");
let resrouceSuffix = getVar("resource-suffix")
if (rootPath && resrouceSuffix) {
return rootPath + basename + resrouceSuffix + extension;
} else {
return null;
}
}