Skip to content

Commit 472315f

Browse files
committed
Fixed incorrect check that meant the URL was being parsed on every call to segment, attr, param etc
1 parent 4bd4c38 commit 472315f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jquery.url.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jQuery.url = function()
6464
*/
6565
var key = function( key )
6666
{
67-
if ( ! parsed.length )
67+
if ( jQuery.isEmptyObject(parsed) )
6868
{
6969
setUp(); // if the URI has not been parsed yet then do this first...
7070
}
@@ -90,7 +90,7 @@ jQuery.url = function()
9090
*/
9191
var param = function( item )
9292
{
93-
if ( ! parsed.length )
93+
if ( jQuery.isEmptyObject(parsed) )
9494
{
9595
setUp(); // if the URI has not been parsed yet then do this first...
9696
}
@@ -154,7 +154,7 @@ jQuery.url = function()
154154
*/
155155
segment : function( pos )
156156
{
157-
if ( ! parsed.length )
157+
if ( jQuery.isEmptyObject(parsed) )
158158
{
159159
setUp(); // if the URI has not been parsed yet then do this first...
160160
}

0 commit comments

Comments
 (0)