mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-14 15:47:12 +00:00
Fix resourcePath() null bug. Fix #219
This commit is contained in:
parent
c37183a876
commit
a5e5998501
1 changed files with 8 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue