@emilgroup/account-sdk 1.4.1 → 1.4.2
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/base.ts +4 -0
- package/dist/base.js +4 -0
- package/package.json +1 -1
package/base.ts
CHANGED
|
@@ -155,11 +155,15 @@ export class BaseAPI {
|
|
|
155
155
|
if (typeof window !== 'undefined') {
|
|
156
156
|
defaultStorage().set<TokenData>(TOKEN_DATA, tokenData);
|
|
157
157
|
}
|
|
158
|
+
|
|
159
|
+
this.tokenData = null;
|
|
158
160
|
}
|
|
159
161
|
|
|
160
162
|
public loadTokenData() {
|
|
161
163
|
if (typeof window !== 'undefined') {
|
|
162
164
|
this.tokenData = defaultStorage().get<TokenData>(TOKEN_DATA) || {};
|
|
165
|
+
} else {
|
|
166
|
+
this.tokenData = {};
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
169
|
|
package/dist/base.js
CHANGED
|
@@ -199,11 +199,15 @@ var BaseAPI = /** @class */ (function () {
|
|
|
199
199
|
if (typeof window !== 'undefined') {
|
|
200
200
|
(0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
|
|
201
201
|
}
|
|
202
|
+
this.tokenData = null;
|
|
202
203
|
};
|
|
203
204
|
BaseAPI.prototype.loadTokenData = function () {
|
|
204
205
|
if (typeof window !== 'undefined') {
|
|
205
206
|
this.tokenData = (0, common_1.defaultStorage)().get(TOKEN_DATA) || {};
|
|
206
207
|
}
|
|
208
|
+
else {
|
|
209
|
+
this.tokenData = {};
|
|
210
|
+
}
|
|
207
211
|
};
|
|
208
212
|
BaseAPI.prototype.cleanTokenData = function () {
|
|
209
213
|
this.storeTokenData(null);
|