Bug 1523457 - Revert a workaround from bug 1517544. r=jaws

Differential Revision: https://phabricator.services.mozilla.com/D17979

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Zibi Braniecki 2019-01-30 14:50:20 +00:00
parent f37d047d4e
commit bb7ea940c9
2 changed files with 5 additions and 3 deletions

View File

@ -570,6 +570,10 @@ class DOMLocalization extends Localization {
* @returns {Promise}
*/
translateRoots() {
if (this.resourceIds.length === 0) {
return Promise.resolve();
}
const roots = Array.from(this.roots);
return Promise.all(
roots.map(async root => {

View File

@ -229,9 +229,7 @@ class Localization {
removeResourceIds(resourceIds) {
this.resourceIds = this.resourceIds.filter(r => !resourceIds.includes(r));
if (this.resourceIds.length) {
this.onChange();
}
this.onChange();
return this.resourceIds.length;
}