Skip to content

Commit aa012cb

Browse files
committed
Fixes bug when passing an array (object) of ids but no options object
1 parent ffe0ba2 commit aa012cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function Model(opts) {
194194
throw new Error("Missing Model.get() callback");
195195
}
196196

197-
if (typeof ids[ids.length - 1] == "object") {
197+
if (typeof ids[ids.length - 1] == "object" && !Array.isArray(ids[ids.length - 1])) {
198198
options = ids.pop();
199199
}
200200

0 commit comments

Comments
 (0)