Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 1108099 - Make formatValue wait for Context.isReady. r=gandalf
Browse files Browse the repository at this point in the history
  • Loading branch information
stasm committed Dec 5, 2014
1 parent f3d9a29 commit 9835ce5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shared/js/l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,7 @@
this.locales = {};

this._emitter = new EventEmitter();
this._ready = new Promise(this.once.bind(this));
}


Expand Down Expand Up @@ -1291,7 +1292,7 @@
}

function formatAsync(fn, id, args) {
return Promise.resolve().then(
return this._ready.then(
getWithFallback.bind(this, id)).then(
fn.bind(this, args),
reportMissing.bind(this, id));
Expand Down

0 comments on commit 9835ce5

Please sign in to comment.