# Adding a revision check to an editor

Save profile and article edits as one versioned snapshot.

## Implementation

Write the new data to a temporary file before replacing the content file. Compare revisions when two editors submit overlapping changes.

## Try it

Open two admin windows. Save from the first, then try to save the stale draft from the second.

- **Topic** — Node.js
- **Reading time** — 7 min
- [Read the reference](<https://nodejs.org/api/fs.html>)
