Skip to content
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

Change ReferenceProperty to return undefined instead of throw #8544

Merged
merged 1 commit into from
Jan 16, 2020

Conversation

shunter
Copy link
Contributor

@shunter shunter commented Jan 15, 2020

Change ReferenceProperty to return undefined when asked for values and the target entity (or target property) does not exist.

This differs from the previous behavior, which was to throw. Throwing can lead to situations where it is effectively impossible to delete and re-create a property which is referenced.

In general, visualizers have always needed to be written to expect the values to properties to suddenly become undefined, which they generally deal with by hiding or removing the related primitives.

Fixes #8521

@cesium-concierge
Copy link

Thanks for the pull request @shunter!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

…d the target entity (or target property) does not exist.

This differs from the previous behavior, which was to throw. Throwing can lead to situations where it is effectively impossible to delete and re-create a property which is referenced.

In general, visualizers have always needed to be written to expect the values to properties to suddenly become undefined, which they generally deal with by hiding or removing the related primitives.
@shunter shunter force-pushed the referencePropertyReturnUndefined branch from cc381cc to 111f83e Compare January 15, 2020 22:11
@mramato
Copy link
Contributor

mramato commented Jan 16, 2020

Thanks @shunter! Looks good to me.

@mramato mramato merged commit 619ab84 into master Jan 16, 2020
@mramato mramato deleted the referencePropertyReturnUndefined branch January 16, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PolylineGeometryUpdater crash when deleting and re-creating an object position
3 participants