mirror of
https://github.com/searxng/searxng.git
synced 2026-06-22 17:48:33 +02:00
[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> {
|
||||
|
||||
Reference in New Issue
Block a user