You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-18 23:07:45 +02:00
Desktop: Create new notes with minimum set of properties to prevent a few minor bugs
This commit is contained in:
@ -47,6 +47,14 @@ class BaseModel {
|
||||
return null;
|
||||
}
|
||||
|
||||
static defaultValues(fieldNames) {
|
||||
const output = {};
|
||||
for (const n of fieldNames) {
|
||||
output[n] = this.db().fieldDefaultValue(this.tableName(), n);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
static modelIndexById(items, id) {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (items[i].id == id) return i;
|
||||
|
Reference in New Issue
Block a user