realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.81k stars 577 forks source link

fix: cannot read property size of undefined (#6626) #6907

Closed MichelGutner closed 1 month ago

MichelGutner commented 1 month ago

What, How & Why?

I fixed the TypeError: Cannot read property 'size' of undefined, which occurred due to attempting to access the size property of an undefined object. I added a check to ensure the object exists before accessing its properties to prevent this error.

This closes #6626

☑️ ToDos

cla-bot[bot] commented 1 month ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Michel Gutner. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
cla-bot[bot] commented 1 month ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Michel Gutner. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
cla-bot[bot] commented 1 month ago

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Michel Gutner. This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails
kraenhansen commented 1 month ago

Thanks for your interest in solving this. It is however an invariant of the Results to have an internal value, so instead of handling the possibility of this internal going missing, the proper solution would be to figure out why this internal doesn't have a value in the first place and fix that.