Use session timestamp when evaluating preconditions

This commit is contained in:
Zaid Abdulla committed 2019-12-06 12:54:35 -08:00
1 parent feb3d7f244
commit f301d70339
1 file changed
+1 -2
+1 -2
View File
@@ -481,10 +481,9 @@ async function applyPresets(sessionContext: SessionContext): Promise<void> {
session.addProvisions(sessionContext, whiteList, whiteListProvisions);
const appendProvisionsToFaults = {};
const now = Date.now();
for (const p of filteredPresets) {
if (
evaluate(p.precondition, {}, now, e =>
evaluate(p.precondition, {}, sessionContext.timestamp, e =>
session.configContextCallback(sessionContext, e)
)
) {