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

Commit f21958f9 by tomchentw

fix(dialects): replace HSTORE checking fn with toString

1 parent 11b8b58b
Showing with 2 additions and 2 deletions
......@@ -137,7 +137,7 @@ module.exports = (function() {
for (var key in rows[0]) {
if (rows[0].hasOwnProperty(key)) {
var record = rows[0][key]
if (!!this.callee.Model && !!this.callee.Model.rawAttributes && !!this.callee.Model.rawAttributes[key] && !!this.callee.Model.rawAttributes[key].type && !!this.callee.Model.rawAttributes[key].type.type && this.callee.Model.rawAttributes[key].type.type === DataTypes.HSTORE.type) {
if (!!this.callee.Model && !!this.callee.Model.rawAttributes && !!this.callee.Model.rawAttributes[key] && !!this.callee.Model.rawAttributes[key].type && this.callee.Model.rawAttributes[key].type.toString() === DataTypes.HSTORE.toString()) {
record = hstore.parse(record)
}
this.callee.dataValues[key] = record
......@@ -152,7 +152,7 @@ module.exports = (function() {
for (var key in rows[0]) {
if (rows[0].hasOwnProperty(key)) {
var record = rows[0][key]
if (!!this.callee.Model && !!this.callee.Model.rawAttributes && !!this.callee.Model.rawAttributes[key] && !!this.callee.Model.rawAttributes[key].type && !!this.callee.Model.rawAttributes[key].type.type && this.callee.Model.rawAttributes[key].type.type === DataTypes.HSTORE.type) {
if (!!this.callee.Model && !!this.callee.Model.rawAttributes && !!this.callee.Model.rawAttributes[key] && !!this.callee.Model.rawAttributes[key].type && this.callee.Model.rawAttributes[key].type.toString() === DataTypes.HSTORE.toString()) {
record = hstore.parse(record)
}
this.callee.dataValues[key] = record
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!