Allows add-on properties of type undefined
to change type
#3874
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows for an add-on property which got an undefined DataType to be redefined with a different DataType.
Fixes #3819
Requirements for Contributing a Bug Fix or Enhancement
Identify the Bug or Feature request
Fixes #3819
Description of the Change
When we assign a property in an add-on with an empty string, the property gets the
UNDEFINED
data type; once this happens, it's not possible anymore for the property to change value.This is because there is an explicit check which controls if we are storing in a property of one type a value which can be converted in that type. No value can be converted into the
UNDEFINED
value, hence the error.This change relaxes the check so that the conversion logic is invoked only when there is no property with the same name or the property has
UNDEFINED
as the DataType of the value stored.Possible Drawbacks
As this is a change in an existing behavior, it's possible that some add-on could break as a result of this. While I fail to see a reasonable use-case for this behavior, it doesn't mean that such an use-case doesn't exist.
Documentation Notes
Relevant lines
Release Notes
This change is