I ran into a prod bug where I was checking for a value to be equal to `true` (boolean not string) in order to decide to load the tag or not. The actual rule checked for the string 'true' which caused my tag to never fire. From the list of conditions I couldn't find a clear choice that would do what I was looking for.
Thoughts:
is defined - would this just do a typeOf 'undefined' check // this wouldn't work because the value I have will be defined, either true or false
equals - seems to only do a string comparison // this was the bug, 'true' != true
is populated - not sure what this actually does, my guess is if it checks for null // also wouldn't work for me, since the var will be populated
I'd suggest either adding a condition for boolean checks or building in logic to the equals condition that checks for type. Neither are a great solution since we'd want to take care of these things from the source and Javascript is a loosely typed language, so many of us will have legacy code that we can't readily adjust the source of the data.
Thoughts?
Thanks,
Sam