Skip to content

Commit 52bcb18

Browse files
author
Julian Xhokaxhiu
committed
Fix JSON decoding.
Merely this was blocking the whole parseUri function and javascript execution.
1 parent a2bb327 commit 52bcb18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/jquery.swipebox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@
741741
a.href = decodeURIComponent( uri );
742742

743743
// QueryString to Object
744-
qs = JSON.parse( a.search.toLowerCase().replace('?','').replace(/&/g,'","').replace(/=/g,'":"') );
744+
qs = JSON.parse( '{"' + a.search.toLowerCase().replace('?','').replace(/&/g,'","').replace(/=/g,'":"') + '"}' );
745745

746746
// Extend with custom data
747747
if ( $.isPlainObject( customData ) ) {

0 commit comments

Comments
 (0)