Skip to content

Commit

Permalink
Add support for reverting a composite saveable (#14079)
Browse files Browse the repository at this point in the history
  • Loading branch information
pisv authored Aug 27, 2024
1 parent acaa3df commit c40f10c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/browser/saveable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ export class CompositeSaveable implements Saveable {
await Promise.all(this.saveables.map(saveable => saveable.save(options)));
}

async revert(options?: Saveable.RevertOptions): Promise<void> {
await Promise.all(this.saveables.map(saveable => saveable.revert?.(options)));
}

get saveables(): readonly Saveable[] {
return Array.from(this.saveablesMap.keys());
}
Expand Down

0 comments on commit c40f10c

Please sign in to comment.