mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix: make sure all tests are passing
This commit is contained in:
@@ -31,7 +31,8 @@ export default class Topic {
|
||||
|
||||
const noteNotebook = notebooks.find((nb) => nb.id === this._notebookId);
|
||||
const noteHasNotebook = !!noteNotebook;
|
||||
const noteHasTopic = noteNotebook.topics.indexOf(topic.id) > -1;
|
||||
const noteHasTopic =
|
||||
noteHasNotebook && noteNotebook.topics.indexOf(topic.id) > -1;
|
||||
if (noteHasNotebook && !noteHasTopic) {
|
||||
// 1 note can be inside multiple topics
|
||||
noteNotebook.topics.push(topic.id);
|
||||
|
||||
Reference in New Issue
Block a user