From 770e4ae120a44667175c8b8b1db91e44ed044e50 Mon Sep 17 00:00:00 2001 From: dblythy Date: Sat, 26 Mar 2022 13:52:53 +1100 Subject: [PATCH] fix: use revert with Cloud Validator `constant` --- src/triggers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/triggers.js b/src/triggers.js index 8320b5fb74..360166d0aa 100644 --- a/src/triggers.js +++ b/src/triggers.js @@ -738,7 +738,7 @@ async function builtInTriggerValidator(options, request, auth) { } if (opt.constant && request.object) { if (request.original) { - request.object.set(key, request.original.get(key)); + request.object.revert(key); } else if (opt.default != null) { request.object.set(key, opt.default); }