1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

All: Fix calls to non-existent function (#2675)

* Fix calls to non-existent function

* Add tests.

* Fix travis lint problems.
This commit is contained in:
mic704b
2020-03-16 08:53:49 +11:00
committed by GitHub
parent 9b562276f3
commit 63a2f7b7a5
4 changed files with 35 additions and 14 deletions

View File

@ -448,7 +448,7 @@ class Note extends BaseItem {
}
static async copyToFolder(noteId, folderId) {
if (folderId == this.getClass('Folder').conflictFolderId()) throw new Error(_('Cannot copy note to "%s" notebook', this.getClass('Folder').conflictFolderIdTitle()));
if (folderId == this.getClass('Folder').conflictFolderId()) throw new Error(_('Cannot copy note to "%s" notebook', this.getClass('Folder').conflictFolderTitle()));
return Note.duplicate(noteId, {
changes: {
@ -459,7 +459,7 @@ class Note extends BaseItem {
}
static async moveToFolder(noteId, folderId) {
if (folderId == this.getClass('Folder').conflictFolderId()) throw new Error(_('Cannot move note to "%s" notebook', this.getClass('Folder').conflictFolderIdTitle()));
if (folderId == this.getClass('Folder').conflictFolderId()) throw new Error(_('Cannot move note to "%s" notebook', this.getClass('Folder').conflictFolderTitle()));
// When moving a note to a different folder, the user timestamp is not updated.
// However updated_time is updated so that the note can be synced later on.