Skip to content

Commit

Permalink
Merge pull request #308 from bartocc/main
Browse files Browse the repository at this point in the history
📝 Fix checkbox field assertion message
  • Loading branch information
ynotdraw authored Jan 17, 2024
2 parents b76ab44 + e274211 commit d6663e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/giant-insects-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@crowdstrike/ember-toucan-core': patch
---

Updated incorrect assertion message with CheckboxField
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class ToucanFormCheckboxFieldComponent extends Component<ToucanFo
args: ToucanFormCheckboxFieldComponentSignature['Args'],
) {
assert(
'Both "@value" and "@isChecked" arguments were supplied. "@value" is reserved for being used in a CheckboxGroupField to specify the value attribute, while "@value" sets the checked state of the checkbox. Please use either "@value" or "@isChecked", but not both.',
'Both "@value" and "@isChecked" arguments were supplied. "@value" is reserved for being used in a CheckboxGroupField to specify the value attribute, while "@isChecked" sets the checked state of the checkbox. Please use either "@value" or "@isChecked", but not both.',
!(args.isChecked && args.value),
);

Expand Down

0 comments on commit d6663e3

Please sign in to comment.