DEV: attempt a more cautious lookup

This was failing the test suite somehow, despite voting using the same
pattern.
This commit is contained in:
Sam Saffron 2019-11-01 15:26:16 +11:00
parent e0de9238a1
commit 68ff24739b
1 changed files with 5 additions and 2 deletions

View File

@ -10,8 +10,11 @@ export default {
enable_unassigned_filter: Ember.computed(
"custom_fields.enable_unassigned_filter",
{
get(fieldName) {
return Ember.get(this.custom_fields, fieldName) === "true";
get() {
if (this && this.custom_fields) {
return this.custom_fields.enable_unassigned_filter === "true";
}
return false;
}
}
)