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.
- package/package.json +1 -1
- package/src/common.js +4 -1
package/package.json
CHANGED
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 =
|
|
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");
|