Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion packages/ember-glimmer/lib/utils/references.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,23 @@ export class AttributeBindingReference extends CachedReference {
compute() {
let value = get(this.component, this.propertyPath);

if (value === null || value === undefined) {
if (value === null || value === undefined || value === false) {
return null;
} else if (value === true) {
// Note:
// This is here to mimic functionality in HTMLBars for properties.
// For instance when a property like "disable" is set all of these
// forms are valid and have the same disabled functionality:
//
// <input disabled />
// <input disabled="true" />
// <input disabled="false" />
// <input disabled="" />
//
// For compatability sake we do not just cast the true boolean to
// a string. Potentially we can revisit this in the future as the
// casting feels better and we can remove this branch.
return '';
} else {
return value;
}
Expand Down
Loading