Skip to content

Modifiers convert Values objects to arrays - #5464

Merged
jasonvarga merged 3 commits into
masterfrom
fix/values-modifiers-array
Mar 11, 2022
Merged

Modifiers convert Values objects to arrays#5464
jasonvarga merged 3 commits into
masterfrom
fix/values-modifiers-array

Conversation

@jasonvarga

Copy link
Copy Markdown
Member

Since #5436, a Replicator/Bard set or Grid row would now be a Values instance and no longer an array.

We were fine with that being a breaking change, but we can avoid it from breaking too much.

If you were to use certain array modifiers on them, what would previously work will no longer work because they'd have is_array checks in there. e.g. contains, in_array, is_array, etc

This PR will convert Values instances to their underlying arrays before running each modifier so it behaves exactly like it did before.

For cases where a nested item is a Values instance, we'll still need to manually handle it. See #5462 for an example.

@jasonvarga
jasonvarga merged commit e8c42fd into master Mar 11, 2022
@jasonvarga
jasonvarga deleted the fix/values-modifiers-array branch March 11, 2022 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants