We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d53efd3 commit 7441ec7Copy full SHA for 7441ec7
src/js.cookie.js
@@ -66,12 +66,10 @@
66
}
67
} catch (e) {}
68
69
- if (!converter.write) {
70
- value = encodeURIComponent(String(value))
+ value = converter.write ?
+ converter.write(value, key) :
71
+ encodeURIComponent(String(value))
72
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
- } else {
73
- value = converter.write(value, key);
74
- }
75
76
key = encodeURIComponent(String(key))
77
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
0 commit comments