Fixed adding ghost post notes after removing some
This commit is contained in:
parent
0edbd9bf40
commit
15739ac7cc
1 changed files with 4 additions and 1 deletions
|
@ -97,7 +97,10 @@ App.Presenters.PostNotesPresenter = function(
|
||||||
promise.wait(api.delete('/notes/' + postNote.id))
|
promise.wait(api.delete('/notes/' + postNote.id))
|
||||||
.then(function() {
|
.then(function() {
|
||||||
hideForm();
|
hideForm();
|
||||||
postNote.$element.remove();
|
notes = jQuery.grep(notes, function(otherNote) {
|
||||||
|
return otherNote.id !== postNote.id;
|
||||||
|
});
|
||||||
|
render();
|
||||||
}).fail(function(response) {
|
}).fail(function(response) {
|
||||||
window.alert(response.json && response.json.error || response);
|
window.alert(response.json && response.json.error || response);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue