Skip to content

Conversation

Tristan-WorkGH
Copy link
Collaborator

Apply final version of gridsuite/gridapp-template#57

@Tristan-WorkGH Tristan-WorkGH self-assigned this Mar 7, 2024
@Tristan-WorkGH
Copy link
Collaborator Author

@TheMaskedTurtle I don't remember what we decided for this statement in api-rest.ts

    const tokenCopy = token || getToken();

|| or ?? (I'm thinking for the case of an empty string)

@TheMaskedTurtle
Copy link
Contributor

@TheMaskedTurtle I don't remember what we decided for this statement in api-rest.ts

    const tokenCopy = token || getToken();

|| or ?? (I'm thinking for the case of an empty string)

I think ?? would be better, the only way it is an empty string is if getToken returns an empty string, but in this case it will keep on returning empty string so it avoids doing token request everytime. If it is an empty string it means there is an authentication issue, so api requests will fail anyway.

@Tristan-WorkGH Tristan-WorkGH merged commit 6b533d5 into main Mar 8, 2024
@Tristan-WorkGH Tristan-WorkGH deleted the gridtemplate/reapply branch March 8, 2024 09:14
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.

2 participants