1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-25 21:08:59 +02:00

fix node.js exports, resolve eval

This commit is contained in:
Thomas Wilkerling
2024-01-08 01:49:39 +01:00
parent 5c54b465a8
commit a0a798d7fe
22 changed files with 32 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
/**!
* FlexSearch.js v0.7.40 (Bundle.module)
* FlexSearch.js v0.7.41 (Bundle.module)
* Author and Copyright: Thomas Wilkerling
* Licence: Apache-2.0
* Hosted by Nextapps GmbH
@@ -601,7 +601,7 @@ function T(a) {
function ua(a, b, c) {
let d;
try {
d = b ? eval('new (require("worker_threads")["Worker"])("../dist/node/node.js")') : a ? new Worker(URL.createObjectURL(new Blob(["onmessage=" + sa.toString()], {type:"text/javascript"}))) : new Worker(C(c) ? c : "worker/worker.js", {type:"module"});
d = b ? new (require("worker_threads")["Worker"])(__dirname + "/node/node.js") : a ? new Worker(URL.createObjectURL(new Blob(["onmessage=" + sa.toString()], {type:"text/javascript"}))) : new Worker(C(c) ? c : "worker/worker.js", {type:"module"});
} catch (e) {
}
return d;