beer-network 1.2.2 → 1.2.4

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 (3) hide show
  1. package/api.js +12 -4
  2. package/package.json +1 -1
  3. package/session.js +0 -1
package/api.js CHANGED
@@ -301,11 +301,19 @@ export default class Fetch {
301
301
  };
302
302
  }
303
303
  async pageTable(response) {
304
+ if (response.success) {
305
+ return {
306
+ data: response.data.records || response.data,
307
+ page: response.data.currentPage || 1,
308
+ total: response.data.totalSize || response.data.length,
309
+ success: true
310
+ };
311
+ }
304
312
  return {
305
- data: response.data.records || response.data,
306
- page: response.data.currentPage || 1,
307
- total: response.data.totalSize || response.data.length,
308
- success: response.success
313
+ data: [],
314
+ page: 1,
315
+ total: 0,
316
+ success: true
309
317
  };
310
318
  }
311
319
  async sleep(value) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "beer-network",
3
3
  "private": false,
4
- "version": "1.2.2",
4
+ "version": "1.2.4",
5
5
  "scripts": {
6
6
  "pub-w": "tsc && copy package.json .\\dist\\package.json && npm publish ./dist",
7
7
  "pub-m": "tsc && cp package.json ./dist/package.json && npm publish ./dist"
package/session.js CHANGED
@@ -43,7 +43,6 @@ export class Session {
43
43
  localStorage.removeItem(key);
44
44
  }
45
45
  }
46
- localStorage?.clear();
47
46
  sessionStorage?.clear();
48
47
  if (url !== undefined && url !== '') {
49
48
  window.location.href = url;