chore: bump version to 0.0.35, update storage reference to globalThis.localStorage, and add beforeRequest option to QueryOptions
This commit is contained in:
@@ -25,7 +25,7 @@ export class QueryClient extends Query {
|
||||
constructor(opts?: QueryOptions & { tokenName?: string; storage?: Storage; io?: boolean }) {
|
||||
super(opts);
|
||||
this.tokenName = opts?.tokenName || 'token';
|
||||
this.storage = opts?.storage || localStorage;
|
||||
this.storage = opts?.storage || globalThis.localStorage;
|
||||
this.beforeRequest = async (opts) => {
|
||||
const token = this.token || this.getToken();
|
||||
if (token) {
|
||||
|
||||
Reference in New Issue
Block a user