posthog-js-lite 2.0.0-alpha2 → 2.0.0-alpha3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/storage.ts CHANGED
@@ -31,8 +31,7 @@ export const cookieStore: PostHogStorage = {
31
31
  expires = '',
32
32
  secure = ''
33
33
 
34
- const new_cookie_val =
35
- key + '=' + encodeURIComponent(JSON.stringify(value)) + expires + '; path=/' + cdomain + secure
34
+ const new_cookie_val = key + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure
36
35
  document.cookie = new_cookie_val
37
36
  } catch (err) {
38
37
  return
@@ -72,7 +71,7 @@ const createStorageLike = (store: any): PostHogStorage => {
72
71
  },
73
72
 
74
73
  setItem(key, value) {
75
- store.setItem(key, JSON.stringify(value))
74
+ store.setItem(key, value)
76
75
  },
77
76
 
78
77
  removeItem(key) {