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

Commit df66d718 by Kevin Jose Martin

Fix "Cannot call method 'toLowerCase' of undefined" error

sequelize/lib/dao.js:139
ap(function(d) { return d.toLowerCase() }).indexOf(values[attrName].toLowerCas
                                                                    ^
TypeError: Cannot call method 'toLowerCase' of undefined
1 parent f8b516da
Showing with 1 additions and 1 deletions
...@@ -135,7 +135,7 @@ module.exports = (function() { ...@@ -135,7 +135,7 @@ module.exports = (function() {
, ciCollation = !!self.daoFactory.options.collate && self.daoFactory.options.collate.match(/_ci$/i) , ciCollation = !!self.daoFactory.options.collate && self.daoFactory.options.collate.match(/_ci$/i)
// Unfortunately for MySQL CI collation we need to map/lowercase values again // 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()) var scopeIndex = (definition.values || []).map(function(d) { return d.toLowerCase() }).indexOf(values[attrName].toLowerCase())
valueOutOfScope = scopeIndex === -1 valueOutOfScope = scopeIndex === -1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!