rename loggedInEmail to loggedInUser with backcompat support. issue #18... #1806

Merged
merged 2 commits into from Jun 29, 2012

Projects

None yet

4 participants

@lloyd
lloyd commented Jun 20, 2012

...05

@callahad callahad commented on an outdated diff Jun 20, 2012
resources/static/include_js/include.js
@@ -1027,13 +1027,25 @@
_open_hidden_iframe();
+ // back compat support for loggedInEmail
+ if (typeof options.loggedInEmail !== 'undefined' &&
+ typeof options.loggedInUser !== 'undefined')
+ {
+ throw "you cannot supply *both* loggedInEmail and loggedInUser";
+ }
+ else if(typeof options.loggedInEmail !== 'undefined')
+ {
+ options.loggedInUser = options.loggedInEmail;
+ delete options.loggedInEmail;
+ }
@callahad
callahad Jun 20, 2012 Mozilla member

Looks good! Pedantry -- shouldn't this be using same-line curly braces to match the rest of this file?

@callahad
Member

Should we add a unit test for this? Otherwise, r+.

@benadida

@callahad is right, we need tests, I guess this means we wait until early next week to merge, that's probably ok.

@lloyd
lloyd commented Jun 25, 2012

oh damn. This means we can't really call the .watch() api stable when we roll 2012.06.22 on july 4th.

@shane-tomlinson shane-tomlinson merged commit d3b9a1f into dev Jun 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment