Permalink
Browse files

Consistently treat extension as something we can iterate across (be i…

…t an array or an object). Fix variable assignment.
  • Loading branch information...
havard committed Feb 21, 2012
1 parent 3f94ea2 commit cdbecbe728782e922fc7d236ee7cfb41ea09de15
Showing with 7 additions and 2 deletions.
  1. +7 −2 openid.js
View
@@ -874,9 +874,14 @@ var _requestAuthentication = function(provider, assoc_handle, returnUrl, realm,
params['openid.ns'] = 'http://specs.openid.net/auth/2.0';
}
- for (var i = 0; i < extensions.length; i++)
+ for (var i in extensions)
{
- extension = extensions[i]
+ if(!extensions.hasOwnProperty(i))
+ {
+ continue;
+ }
+
+ var extension = extensions[i];
for (var key in extension.requestParams)
{
if (!extension.requestParams.hasOwnProperty(key)) { continue; }

0 comments on commit cdbecbe

Please sign in to comment.