Skip to content

Commit 3ab35ab

Browse files
committed
Using a single try/catch block instead of two.
1 parent 0ae9f7e commit 3ab35ab

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎jquery.cookie.js‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,8 @@
3838
try {
3939
// Replace server-side written pluses with spaces.
4040
// If we can't decode the cookie, ignore it, it's unusable.
41-
s = decodeURIComponent(s.replace(pluses, ' '));
42-
} catch(e) {
43-
return;
44-
}
45-
46-
try {
4741
// If we can't parse the cookie, ignore it, it's unusable.
42+
s = decodeURIComponent(s.replace(pluses, ' '));
4843
return config.json ? JSON.parse(s) : s;
4944
} catch(e) {}
5045
}

0 commit comments

Comments
 (0)