web-app
web-app copied to clipboard
fix build undefined in the console
Description
The optional chaining (?.) ensures that if any of the properties (data, git, build, or version) in the chain is null or undefined, the expression short-circuits and returns undefined, instead of throwing an error. If the result of the split operation is not null or undefined, it assigns that value to buildVersion. If the result is null or undefined, it returns an empty array ([]) due to the nullish coalescing (??) operator.
Screenshots, if any
the error
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
-
[x] If you have multiple commits please combine them into one commit by squashing them.
-
[x] Read and understood the contribution guidelines at
web-app/.github/CONTRIBUTING.md
.