Skip to content

Commit

Permalink
upgrade: mysql2 >= 3.9.4 (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjake authored Apr 13, 2024
1 parent 47c56e6 commit f8053dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@
"eslint-plugin-no-only-tests": "^3.0.0",
"expect.js": "^0.3.1",
"husky": "^8.0.3",
"jsdoc": "^3.6.3",
"jsdoc": "^4.0.2",
"lint-staged": "^13.2.2",
"mocha": "^10.2.0",
"mysql": "^2.17.1",
"mysql2": "^2.3.0",
"mysql2": "^3.9.4",
"nyc": "^15.1.0",
"pg": "^8.5.1",
"sinon": "^10.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/bone.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,8 @@ class Bone {
instance._setRaw(attribute.name, attribute.cast(value));
instance._setRawSaved(attribute.name, attribute.cast(value));
} else {
if (!isNaN(value)) instance[columnName] = Number(value);
if (value != null && typeof value == 'object') instance[columnName] = value;
else if (!isNaN(value)) instance[columnName] = Number(value);
else if (!isNaN(Date.parse(value))) instance[columnName] = new Date(value);
else instance[columnName] = value;
}
Expand Down

0 comments on commit f8053dd

Please sign in to comment.