Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
Bug 869382: follow up, exit initGlobal early if we don't have activat…
Browse files Browse the repository at this point in the history
…e and stick to checking for activate; r=stas
  • Loading branch information
Zbigniew Braniecki committed Jun 11, 2013
1 parent d985636 commit 9c3a7fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/l20n/retranslation.js
Expand Up @@ -22,6 +22,9 @@ define(function (require, exports, module) {
function initGlobal(globalCtor) {
var global = new globalCtor();
this.globals[global.id] = global;
if (!global.activate) {
return;
}
_counter[global.id] = 0;
global.addEventListener('change', function(id) {
for (var i = 0; i < _usage.length; i++) {
Expand Down Expand Up @@ -96,7 +99,7 @@ define(function (require, exports, module) {
this.globals[id].activate();
}, this);
var removed = bound.globals.filter(function(id) {
return this.globals[id].deactivate && get.globals.indexOf(id) === -1;
return this.globals[id].activate && get.globals.indexOf(id) === -1;
});
removed.forEach(function(id) {
_counter[id]--;
Expand Down

0 comments on commit 9c3a7fd

Please sign in to comment.