@iankibetsh/shframework 5.2.4 → 5.2.5

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
@@ -437,11 +437,18 @@ const axios = Axios__default["default"].create({
437
437
  window.shAxionInstance = axios;
438
438
  function doGet (endPoint, data,extraConfig) {
439
439
  updateSession();
440
- let config = {
441
- headers: {
442
- Authorization: 'Bearer ' + shStorage.getItem('access_token')
440
+ let accessToken = shStorage.getItem('access_token');
441
+ if(accessToken === 'undefined' || accessToken === 'null'){
442
+ accessToken = null;
443
+ }
444
+ let config = {};
445
+ if(accessToken){
446
+ config = {
447
+ headers: {
448
+ Authorization: 'Bearer ' + accessToken
449
+ }
450
+ };
443
451
  }
444
- };
445
452
  if (extraConfig) {
446
453
  Object.assign(config, extraConfig);
447
454
  }
package/dist/library.mjs CHANGED
@@ -425,11 +425,18 @@ const axios = Axios.create({
425
425
  window.shAxionInstance = axios;
426
426
  function doGet (endPoint, data,extraConfig) {
427
427
  updateSession();
428
- let config = {
429
- headers: {
430
- Authorization: 'Bearer ' + shStorage.getItem('access_token')
428
+ let accessToken = shStorage.getItem('access_token');
429
+ if(accessToken === 'undefined' || accessToken === 'null'){
430
+ accessToken = null;
431
+ }
432
+ let config = {};
433
+ if(accessToken){
434
+ config = {
435
+ headers: {
436
+ Authorization: 'Bearer ' + accessToken
437
+ }
438
+ };
431
439
  }
432
- };
433
440
  if (extraConfig) {
434
441
  Object.assign(config, extraConfig);
435
442
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iankibetsh/shframework",
3
- "version": "5.2.4",
3
+ "version": "5.2.5",
4
4
  "description": "Vue library for handling laravel backend",
5
5
  "main": "dist/library.js",
6
6
  "module": "dist/library.mjs",