web-app icon indicating copy to clipboard operation
web-app copied to clipboard

fix build undefined in the console

Open Omar-Nabil opened this issue 11 months ago • 8 comments

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 aaaa

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.

Omar-Nabil avatar Mar 21 '24 02:03 Omar-Nabil