mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1518786 - Remove translations from the pending queue if there is a caller that is waiting on the specific translations. r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D16588 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e79eecd7af
commit
64abb2f9b4
@ -755,6 +755,12 @@ class DOMLocalization extends Localization {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Remove elements from the pending list since
|
||||
// their translations will get applied below.
|
||||
for (let element of elements) {
|
||||
this.pendingElements.delete(element);
|
||||
}
|
||||
|
||||
const keys = elements.map(this.getKeysForElement);
|
||||
const translations = await this.formatMessages(keys);
|
||||
return this.applyTranslations(elements, translations);
|
||||
|
Loading…
Reference in New Issue
Block a user