File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 744
744
var t = '' ;
745
745
var unique , key , i , length ;
746
746
for ( key in data ) {
747
- if ( hasOwn . call ( data , key ) && key ) {
747
+ if ( hasOwn . call ( data , key ) ) {
748
748
if ( isArray ( data [ key ] ) ) {
749
749
unique = { } ;
750
750
for ( i = 0 , length = data [ key ] . length ; i < length ; i ++ ) {
Original file line number Diff line number Diff line change 1321
1321
1322
1322
u . query ( '?&foo=bar&foo=bar' ) . normalizeQuery ( ) ;
1323
1323
equal ( u . query ( ) , 'foo=bar' , 'duplicate key=value resolution' ) ;
1324
+
1325
+ u . query ( '?=bar' ) . normalizeQuery ( ) ;
1326
+ equal ( u . query ( ) , '=bar' , 'query without key' ) ;
1324
1327
} ) ;
1325
1328
test ( 'normalizeFragment' , function ( ) {
1326
1329
var u = new URI ( 'http://example.org/foobar.html#' ) ;
1330
1333
test ( 'readable' , function ( ) {
1331
1334
var u = new URI ( 'http://foo:bar@www.xn--exmple-cua.org/hello%20world/ä.html?foo%5B%5D=b+är#fragment' ) ;
1332
1335
equal ( u . readable ( ) , 'http://www.exämple.org/hello world/ä.html?foo[]=b är#fragment' , 'readable URL' ) ;
1336
+
1337
+ var u = new URI ( 'http://example.org/?=5640' ) ;
1338
+ equal ( u . readable ( ) , 'http://example.org/?=5640' , 'readable URL: query without key' ) ;
1333
1339
} ) ;
1334
1340
1335
1341
module ( 'resolving URLs' ) ;
You can’t perform that action at this time.
0 commit comments