Skip to content

Commit

Permalink
Fix rollback example in SharedTree quick start doc (#22565)
Browse files Browse the repository at this point in the history
The existing example is incorrect.
  • Loading branch information
noencke authored Sep 18, 2024
1 parent 1d9f4c9 commit 1bb54bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/content/docs/start/tree-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ It can be useful to group edits because a transaction is equivalent to a single
```typescript
Tree.runTransaction(myNode, (node) => {
// Make multiple changes to the tree.
// This can be changes to the referenced node but is not limited to that scope.
// These can be changes to the referenced node but are not limited to that scope.

if (
// Something is wrong here!
) return "rollback";
if ( /* Something went wrong, abort! */ ) {
return Tree.runTransaction.rollback;
}
})
```
Expand Down

0 comments on commit 1bb54bd

Please sign in to comment.