Skip to content
Lamina PDF
Unreleased

These docs describe changes that aren’t released yet. For the newest release, see the released docs.

nested-transaction

All codes

  • Type: error
  • Kind: state (the call isn’t valid in the object’s current state)

What happened

A transaction was started, or undo/redo called, while one is open.

Why

Calling code opened a second transaction.

How to fix

Commit or roll back first, or use a savepoint.

Example

doc.transact((tx) => {
doc.undo(); // nested-transaction: finish the transaction first
});

Data fields

None.