fix using smart values with .dateCreated, closes #1338

This commit is contained in:
zadam
2020-10-27 22:45:22 +01:00
parent 609829653e
commit 8c4ff7ed2a
7 changed files with 36 additions and 21 deletions

View File

@@ -57,8 +57,15 @@ function id() {
return randtoken.generate(10);
}
function note(title, type = 'text', mime = 'text/html') {
const note = new Note(noteCache, {noteId: id(), title, type, mime});
function note(title, extraParams = {}) {
const row = Object.assign({
noteId: id(),
title: title,
type: 'text',
mime: 'text/html'
}, extraParams);
const note = new Note(noteCache, row);
return new NoteBuilder(note);
}