We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35cf9a6 commit aefce63Copy full SHA for aefce63
1 file changed
lib/Model.js
@@ -140,7 +140,7 @@ function Model(opts) {
140
//TODO: Should be smarter about how this is handled.
141
// ideally we should check the type of ID used
142
// by the model, and accept that type of data.
143
- if (typeof data == "number") {
+ if (typeof data == "number" || typeof data == "string") {
144
var data2 = {};
145
data2[opts.id] = data;
146
0 commit comments