Commands that use unify should warn the user that multiple elements were found #1762

CTaylor1118 opened this Issue Dec 9, 2016 · 0 comments


None yet

1 participant

CTaylor1118 commented Dec 9, 2016 edited

The problem

There are several commands that use elements and then the unify command to perform actions. Unify is deceiving as it does not actually unify the results, but rather takes the first result and returns. It's not a good testing practice to have indeterminate results either.



I propose that a warning should be given when multiple elements are returned by a command that make more sense to work on a single element (the setValue command for instance) and possibly enforcing a strict mode that will throw an error if multiple elements are acted upon without the user requesting such. I also think it would be a good idea to modify unify to either return the first value, or all the values and let the user decide what to do with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment