Permalink
Browse files

fix(form-field): check typeof hidden property

  • Loading branch information...
jeremyvergnas committed Jul 27, 2016
1 parent 86eae9d commit 12f6fb1c12a0ed3151c27aa5c553f9791b72e917
Showing with 1 addition and 9 deletions.
  1. +1 −9 src/component/form-field.js
10 src/component/form-field.js 100644 → 100755
@@ -28,15 +28,7 @@ export class FormField {

@computedFrom('value', 'element')
get visible() {
if (this.element.hidden === 'function') {
return !this.element.hidden(this.value);
}

if (this.element.hidden === 'boolean') {
return !this.element.hidden;
}

return true;
return typeof this.element.hidden === 'function' ? this.element.hidden(this.value) : !this.element.hidden;
}

/**

0 comments on commit 12f6fb1

Please sign in to comment.