Skip to content
Snippets Groups Projects

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

Merged 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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading