mirror of
https://github.com/directus/directus.git
synced 2026-01-30 08:47:57 -05:00
Merge branch 'main' into aggregation
This commit is contained in:
@@ -14,9 +14,10 @@ export function parseFilter(filter: Filter, accountability: Accountability | nul
|
||||
else return toArray(val);
|
||||
}
|
||||
|
||||
if (val && val.startsWith('$NOW')) {
|
||||
if (val && typeof val === 'string' && val.startsWith('$NOW')) {
|
||||
if (val.includes('(') && val.includes(')')) {
|
||||
const adjustment = val.match(/\(([^)]+)\)/)?.[1];
|
||||
if (!adjustment) return new Date();
|
||||
return adjustDate(new Date(), adjustment);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user