Skip to content

Commit 3fe6e40

Browse files
committed
resiliencie with unexpected query fields
1 parent 08757e1 commit 3fe6e40

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/database/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class Database4Api extends Database {
288288
}
289289
// If the field is not among date fields then skip it
290290
const fieldConfig = this.PATH_QUERY_FIELDS[field];
291-
if (fieldConfig.type !== 'date') return;
291+
if (!fieldConfig || fieldConfig.type !== 'date') return;
292292
// Parse the date string into a date
293293
// Mongo will handle it as an ISODate
294294
if (typeof value === 'string') {

0 commit comments

Comments
 (0)