Skip to content

Commit aefce63

Browse files
committed
Changes Model to accept string as a Shell Model id (for mongo this is necessary)
1 parent 35cf9a6 commit aefce63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function Model(opts) {
140140
//TODO: Should be smarter about how this is handled.
141141
// ideally we should check the type of ID used
142142
// by the model, and accept that type of data.
143-
if (typeof data == "number") {
143+
if (typeof data == "number" || typeof data == "string") {
144144
var data2 = {};
145145
data2[opts.id] = data;
146146

0 commit comments

Comments
 (0)