summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/history.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/js/history.js b/public/js/history.js
index 10ab932f..82c145da 100644
--- a/public/js/history.js
+++ b/public/js/history.js
@@ -123,8 +123,10 @@ function addHistory(id, text, time, tags, notehistory) {
function removeHistory(id, notehistory) {
for (var i = 0; i < notehistory.length; i++) {
- if (notehistory[i].id == id)
+ if (notehistory[i].id == id) {
notehistory.splice(i, 1);
+ i--;
+ }
}
return notehistory;
}