summaryrefslogtreecommitdiff
path: root/client/simple/src/js
diff options
context:
space:
mode:
authorIvan Gabaldon <igabaldon@inetol.net>2026-02-20 13:00:17 +0100
committerGitHub <noreply@github.com>2026-02-20 13:00:17 +0100
commit93ac6ceb353078c07541438e4e26146b8c9c66ea (patch)
tree4dbfe0acf9f4cc1f7ed6d8f358246d5f92a6b2ad /client/simple/src/js
parent4e6e8425ca3205bc0a8060871c3074db06aed801 (diff)
[fix] themes: run \#invoke after class constructor (#5757)
Move \#invoke into a microtask that will run after current call stack completes Closes: https://github.com/searxng/searxng/issues/5756
Diffstat (limited to 'client/simple/src/js')
-rw-r--r--client/simple/src/js/Plugin.ts2
-rw-r--r--client/simple/src/js/plugin/MapView.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/client/simple/src/js/Plugin.ts b/client/simple/src/js/Plugin.ts
index bd41ff909..350d55666 100644
--- a/client/simple/src/js/Plugin.ts
+++ b/client/simple/src/js/Plugin.ts
@@ -23,7 +23,7 @@ export abstract class Plugin {
protected constructor(id: string) {
this.id = id;
- void this.invoke();
+ queueMicrotask(() => this.invoke());
}
private async invoke(): Promise<void> {
diff --git a/client/simple/src/js/plugin/MapView.ts b/client/simple/src/js/plugin/MapView.ts
index 753e438e1..6e0021d98 100644
--- a/client/simple/src/js/plugin/MapView.ts
+++ b/client/simple/src/js/plugin/MapView.ts
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
-import "ol/ol.css?inline";
+import "ol/ol.css";
import { Feature, Map as OlMap, View } from "ol";
import { GeoJSON } from "ol/format";
import { Point } from "ol/geom";