Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 5bd7eaa

Browse files
maxbrunsfeldNathan Sobo
authored andcommitted
Add assertion that checkpoints have snapshots
Signed-off-by: Nathan Sobo <[email protected]>
1 parent a09afb5 commit 5bd7eaa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/history.coffee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ SerializationVersion = 2
44

55
class Checkpoint
66
constructor: (@id, @snapshot) ->
7+
unless @snapshot?
8+
global.atom?.assert(false, "Checkpoint created without snapshot")
9+
@snapshot = {}
710

811
# Manages undo/redo for {TextBuffer}
912
module.exports =

0 commit comments

Comments
 (0)