RegExpRunner: fix edge case error
This commit is contained in:
parent
bb823b6274
commit
2d8decdb4f
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue