Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Commit

Permalink
Allowed user to provide empty label to hide label display.
Browse files Browse the repository at this point in the history
  • Loading branch information
drq committed Oct 19, 2012
1 parent 6616c9e commit 374d962
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/Field.js
Expand Up @@ -60,10 +60,10 @@
if (!this.schema) {
this.schema = {};
}
if (!this.options.label && this.schema.title) {
if (this.options.label == null && this.schema.title != null) {
this.options.label = this.schema.title;
}
if (!this.options.helper && this.schema.description) {
if (this.options.helper == null && this.schema.description != null) {
this.options.helper = this.schema.description;
}

Expand Down Expand Up @@ -169,7 +169,7 @@
}
}
// last try to see if we can populate the label from propertyId
if (!this.options.label && this.propertyId) {
if (this.options.label == null && this.propertyId) {
this.options.label = this.propertyId;
}
// set default name value if it is not provided through options.
Expand Down

0 comments on commit 374d962

Please sign in to comment.