fix reading properties of undefined
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user