Skip to content
Snippets Groups Projects
Commit bbd902f8 authored by Giulio Gratta's avatar Giulio Gratta
Browse files

Last Changes before Merge

- Change variable name to make it more clear
parent 68ce6ed1
No related merge requests found
......@@ -51,12 +51,12 @@ class @TrackChanges
undo_change: (event) =>
event.preventDefault()
keyToUndo = 0
keyOfLatestChange = 0
@tracked_elements.each ->
key = parseInt(@attr('data-cid'))
if key > keyToUndo
keyToUndo = key
ICEtracker.rejectChange('[data-cid="'+ keyToUndo + '"]')
if key > keyOfLatestChange
keyOfLatestChange = key
ICEtracker.rejectChange('[data-cid="'+ keyOfLatestChange + '"]')
stop_tracking_on_submit: () =>
@tracker.stopTracking()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment