We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2d0c01 commit 5c61611Copy full SHA for 5c61611
lib/schematype.js
@@ -462,7 +462,7 @@ SchemaType.prototype.unique = function(bool) {
462
SchemaType.prototype.text = function(bool) {
463
if (this._index === false) {
464
if (!bool) {
465
- return;
+ return this;
466
}
467
throw new Error('Path "' + this.path + '" may not have `index` set to ' +
468
'false and `text` set to true');
@@ -499,7 +499,7 @@ SchemaType.prototype.text = function(bool) {
499
SchemaType.prototype.sparse = function(bool) {
500
501
502
503
504
505
'false and `sparse` set to true');
0 commit comments