Permalink
Browse files

Fixed URL port type casting issue

Browser expects port in options to be typeof number, however url#parse returns string
  • Loading branch information...
1 parent ab1a709 commit 11095dd89b3952284a6aa2fbf90acc1662be9145 @zzen zzen committed Jan 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/browser.js
View
@@ -128,7 +128,7 @@ Browser.prototype.context = function(selector, fn){
Browser.prototype.hostBrowser = function(uri) {
var otherHostname = uri.hostname
- , port = uri.port || (uri.protocol === 'https:' ? 443 : (this.port || 80))
+ , port = parseInt(uri.port,10) || (uri.protocol === 'https:' ? 443 : (this.port || 80))
, browsers = Browser.browsers
, otherBrowser;
if (!browsers) {

0 comments on commit 11095dd

Please sign in to comment.