getodk / getodk/web-forms

Ensure fallback to global `fetch` has correct `this` binding

Open
#283 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
22
PR merge metrics
No merged PRs in 30d

Description

See #281. As I mentioned in review there:

- I expect this also affects `fetchFormAttachment`. This is less urgent, because that fallback isn't particularly useful unless/until we add offline support (where a `fetch` call handled by a Service Worker may very well be how we handle form attachments).
- We should add tests covering these cases, and anywhere we indirectly reference the global `fetch`. (Bonus points if we can find a way to automate preventing the same mistake again, as it's a pretty easy one to make.)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with issue #281 and trace the fallback uses of the global fetch, including fetchFormAttachment and any indirect references. Add tests covering the correct binding in each case; done means those fallback calls are verified by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.