From 7af99df34cef7e51ad48e6b892fbde58f6c68a6d Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Sat, 13 Apr 2024 07:12:21 +0100 Subject: [PATCH] Allow hoisting __FlagStep in mutations --- grafast/grafast/src/engine/OperationPlan.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grafast/grafast/src/engine/OperationPlan.ts b/grafast/grafast/src/engine/OperationPlan.ts index 15e258c78b..dde33becf9 100644 --- a/grafast/grafast/src/engine/OperationPlan.ts +++ b/grafast/grafast/src/engine/OperationPlan.ts @@ -2499,6 +2499,8 @@ export class OperationPlan { // OPTIMIZE: figure out under which circumstances it is safe to hoist here. // break; return; + } else if (step instanceof __FlagStep) { + break; } else { // Plans that rely on external state shouldn't be hoisted because // their results may change after a mutation, so the mutation should