Skip to content

define constants true, false, undefined, null in extension expr lang

Warren Gifford requested to merge context-false into master

Created by: sqs

Previously, if you had a when or other extension expression such as x === false (or using any of the other constants above), the behavior would be unexpected. There was no identifier named false, so false would actually be undefined. This caused problems when you wanted to have a setting default to true and used a check like config.mysetting !== false. As a temporary workaround until this is merged and released, you can use config.mysetting !== (0==1) because 0==1 evaluates to false not undefined.

Merge request reports

Loading