Skip to content

Commit 1534586

Browse files
committed
Support boolean values in this.get()
1 parent 79d0340 commit 1534586

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

addon/validators/sometimes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ export default function validateSometimes(validators, condition) {
55
return function(key, newValue, oldValue, changes, content) {
66
let thisValue = {
77
get(property) {
8-
return get(changes, property) || get(content, property);
8+
return get(changes, property) != null
9+
? get(changes, property)
10+
: get(content, property);
911
}
1012
};
1113

0 commit comments

Comments
 (0)