New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some stuff around the code #760
Fix some stuff around the code #760
Conversation
patrickelectric
commented
Feb 22, 2024
- add missing await calls
- move variables to const and let where possible
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
…dateCurrentStream Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
56ac582
to
f55c467
Compare
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
…Address Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
f55c467
to
30caea8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, although I'm not sure we want some of those added async parts.
const resetGlobalAddress = (): void => { | ||
const resetGlobalAddress = async (): Promise<void> => { | ||
newGlobalAddress.value = defaultGlobalAddress | ||
|
||
setGlobalAddress() | ||
await setGlobalAddress() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would this be async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's defined as async
const setGlobalAddress = async (): Promise<void> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Humnnnn, the form validation is async, didn't know that.
// We use a self invoked await function to avoid moving the entire store to async | ||
;(async () => importProfilesFromVehicle())() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with that workaround. Will this actually wait?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. More on that here.