fix: linkage failed with current date variable (#2272)

* fix: linkage failed with current date variable

* fix: linkage failed with current date variable
This commit is contained in:
katherinehhh 2023-07-19 10:13:20 +08:00 committed by GitHub
parent a57b4a8359
commit d36b9e366a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,8 @@ function getAllKeys(obj) {
return keys; return keys;
} }
export const conditionAnalyse = (rules, values) => { export const conditionAnalyse = (rules, scope) => {
const values = { ...scope, now: new Date() };
const type = Object.keys(rules)[0] || '$and'; const type = Object.keys(rules)[0] || '$and';
const conditions = rules[type]; const conditions = rules[type];
const results = conditions.map((c) => { const results = conditions.map((c) => {