mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
api: add default General topic in notebook
This commit is contained in:
@@ -105,9 +105,10 @@ class Database {
|
||||
async addNotebook(notebook) {
|
||||
if (!notebook || !notebook.title) return;
|
||||
const id = notebook.dateCreated || Date.now();
|
||||
let topics = {};
|
||||
let topics = { General: [] };
|
||||
if (notebook.topics) {
|
||||
for (let topic of notebook.topics) {
|
||||
if (!topic) continue;
|
||||
topics[topic] = [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user