Closed Bug 994722 Opened 10 years ago Closed 10 years ago

i81n callback called twice in a row regardless of error state

Categories

(Webmaker Graveyard :: Localization, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bobby, Assigned: alicoding)

Details

Attachments

(1 file)

https://github.com/mozilla/node-webmaker-i18n/blob/master/i18n.js#L251

Found this code trying to debug our usage of i18n:

  if(!errFlag) {
    callback(error, false);
  }
  callback(null, true);

Looks like a `return` is missing.

Btw, what's the point of the flag? Is it different than checking for absence of error?
Attachment #8405390 - Flags: review?(cade) → review+
Merged https://github.com/alicoding/node-webmaker-i18n/commit/696e68ba0afc5f44433a43ec78665b2ff67621ab
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: