[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
This commit is contained in:
@@ -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> {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user