Fix local markdown title option persistence
This commit is contained in:
@@ -163,8 +163,13 @@ import {
|
||||
const syncPageAggregateScript = (session, aggregate) => {
|
||||
if (!session || !aggregate) return;
|
||||
const scriptId = session.pageAggregateScriptId || '__MNOTE_PAGE_AGGREGATE__';
|
||||
const node = document.getElementById(scriptId);
|
||||
if (!node) return;
|
||||
let node = document.getElementById(scriptId);
|
||||
if (!node) {
|
||||
node = document.createElement('script');
|
||||
node.id = scriptId;
|
||||
node.type = 'application/json';
|
||||
document.body.appendChild(node);
|
||||
}
|
||||
try {
|
||||
node.textContent = JSON.stringify(aggregate);
|
||||
node.setAttribute('data-mnote-page-aggregate-synced-at', String(Date.now()));
|
||||
@@ -343,6 +348,7 @@ import {
|
||||
}
|
||||
const aggregate = options.aggregate || await fetchPageAggregateForPane(descriptor);
|
||||
const bootstrap = buildBootstrapFromAggregate(aggregate, descriptor, paneRole);
|
||||
syncPageAggregateScript({ pageAggregateScriptId: bootstrap.pageAggregateScriptId }, aggregate);
|
||||
const runtimeDescriptor = { paneRole, root, observability, aggregate, bootstrap };
|
||||
updatePaneChrome(runtimeDescriptor);
|
||||
if (paneRole === 'secondary' && workspace instanceof HTMLElement) {
|
||||
|
||||
Reference in New Issue
Block a user