codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
24 stars 23 forks source link

Issue #615 refetch if null #616

Closed JaeGif closed 2 months ago

JaeGif commented 2 months ago

This PR:

Resolves #615

Issue seems to be that useRdfCollection's storedDocument is occasionally null when the mutation is called. My quick workaround is to add a useEffect that forces a refetch (and therefore a new state of storedDocument) if storedDocument is null.

Additional Context (optional):

This feels a little hacky to me but I'm not familiar enough with the codebase yet to figure out a different way. A new set of eyes/feedback is appreciated.

leekahung commented 2 months ago

Hold on, make sure you format and lint the files before merging.

JaeGif commented 2 months ago

Hold on, make sure you format and lint the files before merging.

Whoops, must've been removing the new line in the gh editor. Will fix in a moment.