Skip to content

Commit 950c2bd

Browse files
Make eq-by helper resilient to a lack of prop since handlebars doesn't short-circuit evaluation
1 parent 7dde9ab commit 950c2bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/app/helpers/eq-by.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { helper } from '@ember/component/helper';
99
* Returns true when obj1 and obj2 have the same value for property "prop"
1010
*/
1111
export function eqBy([prop, obj1, obj2]) {
12-
if (!obj1 || !obj2) return false;
12+
if (!prop || !obj1 || !obj2) return false;
1313
return get(obj1, prop) === get(obj2, prop);
1414
}
1515

0 commit comments

Comments
 (0)