3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 00:05:04 +00:00

RegExpRunner: fix edge case error

This commit is contained in:
Dragory 2020-08-09 16:58:59 +03:00
parent 7595baf945
commit ea0e036c1b

View file

@ -68,7 +68,10 @@ export class RegExpRunner extends EventEmitter {
if (!this._worker) {
this._worker = new RegExpWorker(newWorkerTimeout);
if (newWorkerTimeout !== FINAL_REGEX_TIMEOUT) {
regexTimeoutUpgradePromise.then(() => (this._worker.timeout = FINAL_REGEX_TIMEOUT));
regexTimeoutUpgradePromise.then(() => {
if (!this._worker) return;
this._worker.timeout = FINAL_REGEX_TIMEOUT;
});
}
}