Why is this update causing a duplicate Actor sheet to be opened?

On my ActorSheetShell.svelte I have a button:
<i class="fas fa-lock" on:click="{toggleLock}" />

Which updates a boolean on the Actor sheet system:
  function toggleLock() {
    $doc.update(
      {
        ["system.inventoryLocked"]: !$doc.system.inventoryLocked,
      },
      {
        diff: true,
        diffData: true,
        diffSystem: true,
        render: false,
      }
    );
  }

But for some reason that triggers an opening of the Actor sheet. Any clues?
Was this page helpful?