fix reading properties of undefined

This commit is contained in:
2025-01-29 17:42:56 +00:00
parent a430aa0eab
commit ca245bfedb
+1 -1
View File
@@ -36,7 +36,7 @@ export default class WebStorage {
* @param {String | URL} resource * @param {String | URL} resource
* @param {RequestInit} options * @param {RequestInit} options
*/ */
async fetch(resource, options) { async fetch(resource, options={}) {
resource = new URL(resource, this.#origin) resource = new URL(resource, this.#origin)
if (resource.origin == this.#origin) { if (resource.origin == this.#origin) {
const token = await this.#auth_provider.getAccessTokenForUser() const token = await this.#auth_provider.getAccessTokenForUser()