无法在字符串上创建属性'Symbol(settingsCache)'

时间:2019-01-01 06:19:56

标签: javascript node.js object joi

我无法在字符串上创建属性'Symbol(settingsCache)'。

对象:

_query = { 'masterEmail': 'xyz@abc.com' }
_schema = { 'masterEmail': Joi.string().email() }

代码:

   // joi validation.
  _joi = Joi.validate(_query, _schema, (__isRejected, __isFullFilled) => {
    // conditional promise.
    return !__isRejected ? __isFullFilled : __isRejected
  }, this)

错误: Cannot create property 'Symbol(settingsCache)' on string

0 个答案:

没有答案