Skip to content

Commit

Permalink
🐛 Prevent NaN screenDelta in changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abe33 committed Jan 6, 2015
1 parent 8d026d1 commit 4f00149
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mixins/canvas-drawer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ class CanvasDrawer extends Mixin
for change in @pendingChanges
newIntactRanges = []
for range in intactRanges
if isNaN(change.screenDelta)
debugger if atom.inDevMode()
change.screenDelta = change.end - change.start

if change.end < range.start and change.screenDelta != 0
newIntactRanges.push(
start: range.start + change.screenDelta
Expand Down

0 comments on commit 4f00149

Please sign in to comment.