Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describedBy: computed('error', 'helpText', function() {
let { error, helpText, _id: id } = this.getProperties(
'error',
'helpText',
'_id'
);
let describedBy = [];
if (helpText) {
describedBy.push(helpTextId(id));
}
if (error) {
describedBy.push(errorId(id));
}
return describedBy.length ? describedBy.join(' ') : undefined;
}).readOnly(),
ariaDescribedBy: computed('error', 'helpText', function() {
let { error, helpText, id } = this.getProperties('error', 'helpText', 'id');
let describedBy = [];
if (error) {
describedBy.push(errorId(id));
}
if (helpText) {
describedBy.push(helpTextId(id));
}
return describedBy.length ? describedBy.join(' ') : undefined;
}).readOnly(),