Skip to content

Commit

Permalink
perf: reduce database operations when using the constant parameter in…
Browse files Browse the repository at this point in the history
… Cloud Function validation (#7892)
  • Loading branch information
dblythy authored and mtrezza committed May 1, 2022
1 parent 884f4c0 commit d43e2da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/triggers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d43e2da

Please sign in to comment.