mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 06:29:29 +01:00
core: fix cannot read property title of undefined
This commit is contained in:
@@ -264,8 +264,8 @@ export default class Notes extends Collection {
|
|||||||
const { color, tags, id } = note;
|
const { color, tags, id } = note;
|
||||||
|
|
||||||
if (color) {
|
if (color) {
|
||||||
const { title } = await this._db.colors.add(color, id);
|
const addedColor = await this._db.colors.add(color, id);
|
||||||
note.color = title;
|
if (addedColor) note.color = addedColor.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tags && tags.length) {
|
if (tags && tags.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user