Skip to content

Conversation

Jade-GG
Copy link
Collaborator

@Jade-GG Jade-GG commented Sep 15, 2025

Depending on what order the code gets loaded in, these watch functions may be called before the variable exists. This throws an error and breaks all JS on the site.

For example, on a vanilla Rapidez installation this can happen with the useCart watch if you don't install rapidez/account. Possibly something to do with how useMask imports it---it's not entirely clear how the imports end up getting resolved under different circumstances.

Because we don't have exact control over when and how things get loaded in, the best solution I could find is to make the watch get executed later. This still works exactly as it should, but makes sure everything is loaded in before.

The one in useUser is probably unnecessary, but I've added it anyway to be safe.

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Sep 15, 2025

This seems to unfortunately not fix anything after all :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant