From 3251b06e0622e8ff864a37008d2885957fce553b Mon Sep 17 00:00:00 2001 From: sua yoo Date: Tue, 12 Dec 2023 12:11:29 -0800 Subject: [PATCH] Fix fetch helper (#1442) Fixes https://github.com/webrecorder/browsertrix-cloud/issues/1441, regression introduced in https://github.com/webrecorder/browsertrix-cloud/pull/1423 ### Manual testing 1. Log in and go to "Archived Items" 2. Click a crawl. Verify that "Sorry, couldn't retrieve crawl logs" notification doesn't show and logs fetch as expected. ### Follow-ups Consistency pass on rest of `LitElement` helpers here: https://github.com/webrecorder/browsertrix-cloud/pull/1443 --- frontend/src/utils/LiteElement.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/utils/LiteElement.ts b/frontend/src/utils/LiteElement.ts index 6ce23f76..0d35e429 100644 --- a/frontend/src/utils/LiteElement.ts +++ b/frontend/src/utils/LiteElement.ts @@ -47,7 +47,6 @@ export default class LiteElement extends LitElement { /** * @deprecated New components should use APIController directly */ - async apiFetch(...args: Parameters) { - return this.apiController.fetch(...args); - } + apiFetch = async (...args: Parameters) => + this.apiController.fetch(...args); }