不要怂,就是干,撸起袖子干!

Commit 858a3874 by Daniel Durante

Merge pull request #988 from KevinMartin/patch-1

Fix "Cannot call method 'toLowerCase' of undefined" error
2 parents f8b516da df66d718
Showing with 1 additions and 1 deletions
......@@ -135,7 +135,7 @@ module.exports = (function() {
, ciCollation = !!self.daoFactory.options.collate && self.daoFactory.options.collate.match(/_ci$/i)
// Unfortunately for MySQL CI collation we need to map/lowercase values again
if (isEnum && isMySQL && ciCollation) {
if (isEnum && isMySQL && ciCollation && (attrName in values)) {
var scopeIndex = (definition.values || []).map(function(d) { return d.toLowerCase() }).indexOf(values[attrName].toLowerCase())
valueOutOfScope = scopeIndex === -1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!