We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 151d8cc commit ab227a3Copy full SHA for ab227a3
package/lib/validation/typeValidator/index.js
@@ -24,7 +24,7 @@ export default function typeValidator() {
24
25
if (expectedType === Object || SimpleSchema.isSimpleSchema(expectedType)) {
26
// Is it an object?
27
- if (Object.prototype.toString.call(keyValue) === '[object Object]') return;
+ if (keyValue === Object(keyValue) && typeof keyValue[Symbol.iterator] !== 'function' && !(keyValue instanceof Date)) return;
28
return { type: SimpleSchema.ErrorTypes.EXPECTED_TYPE, dataType: 'Object' };
29
}
30
0 commit comments