fix v86_bin_fallback full path: getDirname (2) (#624)
Fix v86_bin_fallback when wasm_path is given
This commit is contained in:
parent
5199c3dc87
commit
e7f574f4d8
|
@ -160,6 +160,9 @@ function V86Starter(options)
|
|||
if(options["wasm_path"])
|
||||
{
|
||||
v86_bin = options["wasm_path"];
|
||||
const slash = v86_bin.lastIndexOf("/");
|
||||
const dir = slash === -1 ? "" : v86_bin.substr(0, slash);
|
||||
v86_bin_fallback = dir + "/" + v86_bin_fallback;
|
||||
}
|
||||
else if(typeof window === "undefined" && typeof __dirname === "string")
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue