Repository navigation
Commit 4527b37
committed
Fix removing cookies in sub paths
When trying to remove a cookie in a sub path (defined via path), we can't
first try to read the cookie in a guard clause, it won't be readable
and thus the removal was not even attempted. So I'm removing the guard
clause entirely. On second thought its return value was also wrong anyway:
when attempting to remove a non-existing cookie, after the removal it still
doesn't exist and the removeCookie() should therefore return false.
Closes js-cookie#336.1 parent 41b1bad commit 4527b37
2 files changed
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
| |||
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
0 commit comments