diff --git a/CliClient/build.sh b/CliClient/build.sh index eb23fcaf43..f83d6c53c1 100755 --- a/CliClient/build.sh +++ b/CliClient/build.sh @@ -6,6 +6,6 @@ rm -f "$CLIENT_DIR/app/lib" ln -s "$CLIENT_DIR/../lib" "$CLIENT_DIR/app" cp "$CLIENT_DIR/package.json" "$CLIENT_DIR/build" -# Always keep this as the last line so that the exist +# Always keep this as the last line so that the exit # code of build.sh is the same as the build command: npm run build \ No newline at end of file diff --git a/lib/models/tag.js b/lib/models/tag.js index ddfa7a5c61..be24347a2b 100644 --- a/lib/models/tag.js +++ b/lib/models/tag.js @@ -36,13 +36,9 @@ class Tag extends BaseItem { let noteIds = await this.tagNoteIds(tagId); if (!noteIds.length) return []; - let noteIdsSql = noteIds.join('","'); - noteIdsSql = '"' + noteIdsSql + '"'; - let options = { - conditions: ['id IN (' + noteIdsSql + ')'], - }; - - return Note.search(options); + return Note.search({ + conditions: ['id IN ("' + noteIds.join('","') + '")'], + }); } static async addNote(tagId, noteId) {