Skip to content

Commit d43e2da

Browse files
dblythymtrezza
authored andcommitted
perf: reduce database operations when using the constant parameter in Cloud Function validation (#7892)
1 parent 884f4c0 commit d43e2da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/triggers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ async function builtInTriggerValidator(options, request, auth) {
738738
}
739739
if (opt.constant && request.object) {
740740
if (request.original) {
741-
request.object.set(key, request.original.get(key));
741+
request.object.revert(key);
742742
} else if (opt.default != null) {
743743
request.object.set(key, opt.default);
744744
}

0 commit comments

Comments
 (0)