laravel-request 1.2.23 → 1.2.25

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/@types/Api.d.ts CHANGED
@@ -4,6 +4,7 @@ declare module 'laravel-request' {
4
4
  static requestClass: any;
5
5
  static tokenResolver: () => Promise<string | null>;
6
6
  static domainResolver: () => string;
7
+ static isDebug: () => string;
7
8
 
8
9
  static getArg(controller: string, action: string, arg: any, data?: Record<string, any>): ApiRequest;
9
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "laravel-request",
3
3
  "productName": "laravel-request",
4
- "version": "1.2.23",
4
+ "version": "1.2.25",
5
5
  "description": "laravel-request",
6
6
  "main": "src/index.js",
7
7
  "module": "src/index.js",
package/src/Api.js CHANGED
@@ -22,7 +22,10 @@ export default class Api {
22
22
  */
23
23
  static tokenResolver = async () =>
24
24
  {
25
- return localStorage.getItem('api_token');
25
+ if(typeof window !== 'undefined' && typeof window.document !== 'undefined')
26
+ {
27
+ return window.localStorage.getItem('api_token');
28
+ }
26
29
  }
27
30
 
28
31
  /**