Skip to content

Commit 076562e

Browse files
committed
address pr comments
1 parent 8c7bfb3 commit 076562e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/runtime/src/plugins/policy/policy-handler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,10 @@ export class PolicyHandler<Schema extends SchemaDef> extends OperationNodeTransf
183183
}
184184
}
185185

186-
let result = super.transformInsertQuery(node);
187186
// merge updated onConflict
188-
result = onConflict ? { ...result, onConflict } : result;
187+
const processedNode = onConflict ? { ...node, onConflict } : node;
188+
189+
const result = super.transformInsertQuery(processedNode);
189190

190191
if (!node.returning) {
191192
return result;

0 commit comments

Comments
 (0)