@iankibetsh/shframework 5.2.2 → 5.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.
package/dist/library.js CHANGED
@@ -453,15 +453,18 @@ function doGet (endPoint, data,extraConfig) {
453
453
  }
454
454
  function doPost (endPoint, data, extraConfig) {
455
455
  updateSession();
456
- const accessToken = shStorage.getItem('access_token');
456
+ let accessToken = shStorage.getItem('access_token');
457
+ if(accessToken === 'undefined' || accessToken === 'null'){
458
+ accessToken = null;
459
+ }
460
+ let config = {};
457
461
  if(accessToken){
458
- ({
462
+ config = {
459
463
  headers: {
460
- Authorization: 'Bearer ' + shStorage.getItem('access_token')
464
+ Authorization: 'Bearer ' + accessToken
461
465
  }
462
- });
466
+ };
463
467
  }
464
-
465
468
  if (extraConfig) {
466
469
  Object.assign(config, extraConfig);
467
470
  }
package/dist/library.mjs CHANGED
@@ -441,15 +441,18 @@ function doGet (endPoint, data,extraConfig) {
441
441
  }
442
442
  function doPost (endPoint, data, extraConfig) {
443
443
  updateSession();
444
- const accessToken = shStorage.getItem('access_token');
444
+ let accessToken = shStorage.getItem('access_token');
445
+ if(accessToken === 'undefined' || accessToken === 'null'){
446
+ accessToken = null;
447
+ }
448
+ let config = {};
445
449
  if(accessToken){
446
- ({
450
+ config = {
447
451
  headers: {
448
- Authorization: 'Bearer ' + shStorage.getItem('access_token')
452
+ Authorization: 'Bearer ' + accessToken
449
453
  }
450
- });
454
+ };
451
455
  }
452
-
453
456
  if (extraConfig) {
454
457
  Object.assign(config, extraConfig);
455
458
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.2.2",
3
+ "version": "5.2.4",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",