jkdsjkdsj
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"id": "dragonroll-foundry",
|
||||
"title": "Dragonroll Foundry API",
|
||||
"description": "Links a Foundry world to a Dragonroll campaign and exposes a client-side API for world data.",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"library": true,
|
||||
"compatibility": {
|
||||
"minimum": "12",
|
||||
|
||||
@@ -1432,7 +1432,7 @@ async function applyDragonrollNotePage(page, entry) {
|
||||
const title = notePageTitle(entry);
|
||||
const html = notePageHtml(entry.content);
|
||||
const updates = {};
|
||||
if (String(page.title?.text ?? page.title ?? "") !== title) updates["title.text"] = title;
|
||||
if (String(page.name ?? "") !== title) updates.name = title;
|
||||
if (String(page.text?.content ?? "") !== html) updates["text.content"] = html;
|
||||
if (!dragonrollNoteId(page)) updates[`flags.${MODULE_ID}.noteId`] = String(entry._id);
|
||||
if (Object.keys(updates).length) await page.update(updates);
|
||||
@@ -1440,7 +1440,9 @@ async function applyDragonrollNotePage(page, entry) {
|
||||
|
||||
async function createDragonrollNotePage(journal, entry) {
|
||||
const pages = await journal.createEmbeddedDocuments("JournalEntryPage", [{
|
||||
title: { text: notePageTitle(entry) },
|
||||
// A page's display title is its `name`; `title` only holds the table-of-contents
|
||||
// flags (`show`/`level`). Missing `name` fails the document's validation.
|
||||
name: notePageTitle(entry),
|
||||
text: { content: notePageHtml(entry.content) },
|
||||
flags: { [MODULE_ID]: { noteId: String(entry._id) } },
|
||||
}], { renderSheet: false });
|
||||
|
||||
Reference in New Issue
Block a user