Fix ephemeral stopping strings flush

This commit is contained in:
Cohee
2023-11-24 19:06:31 +02:00
parent 2c8e855385
commit a178bdc3b0
2 changed files with 24 additions and 14 deletions

View File

@ -2388,6 +2388,10 @@ export function addEphemeralStoppingString(value) {
}
export function flushEphemeralStoppingStrings() {
if (EPHEMERAL_STOPPING_STRINGS.length === 0) {
return;
}
console.debug('Flushing ephemeral stopping strings:', EPHEMERAL_STOPPING_STRINGS);
EPHEMERAL_STOPPING_STRINGS.length = 0;
}