Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: check if .length is >= the limit

thecodrr97b04a891cfa
diff --git a/packages/core/collections/notebooks.js b/packages/core/collections/notebooks.js
index 21f893989..d167c3a2a 100644
--- a/packages/core/collections/notebooks.js
+++ b/packages/core/collections/notebooks.js
@@ -13,7 +13,7 @@ export default class Notebooks extends Collection {
async add(notebookArg) {
if (!notebookArg) throw new Error("Notebook cannot be undefined or null.");
if (
- this.all.length === 3 &&
+ this.all.length >= 3 &&
!(await sendCheckUserStatusEvent("notebook:add"))
)
return;
diff --git a/packages/core/models/note.js b/packages/core/models/note.js
index c049767cd..b1f25b2ff 100644
--- a/packages/core/models/note.js
+++ b/packages/core/models/note.js
@@ -94,7 +94,7 @@ export default class Note {
async tag(tag) {
if (
- this._db.tags.all.length === 5 &&
+ this._db.tags.all.length >= 5 &&
!(await sendCheckUserStatusEvent("note:tags"))
)
return;