[Canvas] Comparison Canvas Functions have wonky comparison operators #35433
Labels
chore
Feature:Canvas
loe:small
Small Level of Effort
Team:Presentation
Presentation Team for Dashboard, Input Controls, and Canvas
Comparison Functions in Canvas, like
compare
,gt
, etc, do some strange mathematical comparisons, considering either the context or the value is allowed to benull
.https://github.com/elastic/kibana/blob/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/compare.js#L48-L62
We're basically relying on JS to determine this, and Typescript doesn't allow for
<
or>
tests ofnull
, (and for good reason).We need to fix this at some point. I'm logging this to track, as it may affect backwards compatibility and should be a separate PR.
The text was updated successfully, but these errors were encountered: