Skip to content

Commit

Permalink
add comment about text field default (keystonejs#6942)
Browse files Browse the repository at this point in the history
* add comment about default

* Update index.ts

Co-authored-by: Daniel Cousens <dcousens@users.noreply.github.com>
Co-authored-by: Thomas Walker <bladey@me.com>
  • Loading branch information
3 people authored Nov 17, 2021
1 parent d844be8 commit 1b92742
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/keystone/src/fields/types/text/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const text =
},
};

// defaulted to false as a zero length string is preferred to null
const isNullable = config.db?.isNullable ?? false;

const fieldLabel = config.label ?? humanize(meta.fieldKey);
Expand Down

0 comments on commit 1b92742

Please sign in to comment.