Skip to content

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

fix: allow editing of all notebooks freely

thecodrr0b4ef6911640
diff --git a/packages/core/collections/notebooks.js b/packages/core/collections/notebooks.js
index 419bce908..5aa7f74b5 100644
--- a/packages/core/collections/notebooks.js
+++ b/packages/core/collections/notebooks.js
@@ -12,11 +12,6 @@ if (!tfun) {
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 &&
- !(await sendCheckUserStatusEvent("notebook:add"))
- )
- return;
if (notebookArg.remote) {
return await this._collection.addItem(notebookArg);
@@ -26,6 +21,13 @@ export default class Notebooks extends Collection {
const id = notebookArg.id || getId();
let oldNotebook = this._collection.getItem(id);
+ if (
+ !oldNotebook &&
+ this.all.length >= 3 &&
+ !(await sendCheckUserStatusEvent("notebook:add"))
+ )
+ return;
+
if (!oldNotebook && !notebookArg.title)
throw new Error("Notebook must contain at least a title.");