sync / transaction fixes for recent notes

This commit is contained in:
azivner
2017-11-24 00:09:53 -05:00
parent 1a36daa088
commit f799d3076b
2 changed files with 17 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ const recentNotes = (function() {
function addRecentNote(notePath) {
setTimeout(() => {
// we include the note into recent list only if the user stayed on the note at least 5 seconds
if (notePath === noteTree.getCurrentNotePath()) {
if (notePath && notePath === noteTree.getCurrentNotePath()) {
$.ajax({
url: baseApiUrl + 'recent-notes/' + encodeURIComponent(notePath),
type: 'PUT',