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 70f7a8a commit c009f3cCopy full SHA for c009f3c
rdmo/core/assets/js/utils/store.js
@@ -0,0 +1,14 @@
1
+import Cookies from 'js-cookie'
2
+import isEmpty from 'lodash/isEmpty'
3
+
4
+const checkStoreId = () => {
5
+ const currentStoreId = Cookies.get('storeid')
6
+ const localStoreId = localStorage.getItem('rdmo.storeid')
7
8
+ if (isEmpty(localStoreId) || localStoreId !== currentStoreId) {
9
+ localStorage.clear()
10
+ localStorage.setItem('rdmo.storeid', currentStoreId)
11
+ }
12
+}
13
14
+export { checkStoreId }
0 commit comments