orderiom-api-package 0.4.96 → 0.4.97

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/common.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orderiom-api-package",
3
- "version": "0.4.96",
3
+ "version": "0.4.97",
4
4
  "description": "This package will install all necessary API calls for every orderiom restaurant",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/src/common.js CHANGED
@@ -187,7 +187,10 @@ export const defineInterceptors = ({$store}) => {
187
187
 
188
188
  // if the token is expired or does not exist, wait for public token to be fetched
189
189
  return new Promise((resolve, reject) => {
190
- const hadPrivateToken = !!localStorage.getItem("privateToken");
190
+ const hadPrivateToken = Boolean(
191
+ localStorage.getItem("privateToken") ||
192
+ $store.state.orderiomApiPackage.auth.user.id
193
+ );
191
194
  // remove invalid or expired tokens
192
195
  token = null;
193
196
  localStorage.removeItem("privateToken");