asdasd
This commit is contained in:
@@ -177,10 +177,7 @@
|
||||
try {
|
||||
if (isText && component.components) {
|
||||
try {
|
||||
const comps = component.components();
|
||||
if (comps && comps.length) {
|
||||
component.components([]);
|
||||
}
|
||||
component.components(content);
|
||||
} catch {}
|
||||
}
|
||||
if (component.set) component.set('content', content);
|
||||
|
||||
@@ -437,6 +437,14 @@
|
||||
if (viewHtml === modelHtml) return;
|
||||
try {
|
||||
syncing.add(target);
|
||||
if (target.components) {
|
||||
try {
|
||||
const comps = target.components();
|
||||
if (!comps || !comps.length) {
|
||||
target.components(viewHtml);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
if (target.set) target.set('content', viewHtml);
|
||||
target.trigger && target.trigger('change:content');
|
||||
if (target.view && typeof target.view.render === 'function') {
|
||||
@@ -469,6 +477,13 @@
|
||||
if (viewHtml === modelHtml && hasComps) return;
|
||||
try {
|
||||
syncing.add(target);
|
||||
if (target.components) {
|
||||
try {
|
||||
if (!hasComps) {
|
||||
target.components(viewHtml);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
if (target.set) target.set('content', viewHtml);
|
||||
target.trigger && target.trigger('change:content');
|
||||
if (target.view && typeof target.view.render === 'function') {
|
||||
@@ -605,6 +620,14 @@
|
||||
if (viewHtml === modelHtml) return;
|
||||
try {
|
||||
syncing.add(component);
|
||||
if (component.components) {
|
||||
try {
|
||||
const comps = component.components();
|
||||
if (!comps || !comps.length) {
|
||||
component.components(viewHtml);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
if (component.set) component.set('content', viewHtml);
|
||||
component.trigger && component.trigger('change:content');
|
||||
if (component.view && typeof component.view.render === 'function') {
|
||||
@@ -669,6 +692,14 @@
|
||||
const viewHtml = normalizeViewHtml(selectedEl.innerHTML || '');
|
||||
if (!viewHtml) return;
|
||||
syncing.add(selected);
|
||||
if (selected.components) {
|
||||
try {
|
||||
const comps = selected.components();
|
||||
if (!comps || !comps.length) {
|
||||
selected.components(viewHtml);
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
if (selected.set) selected.set('content', viewHtml);
|
||||
selected.trigger && selected.trigger('change:content');
|
||||
if (selected.view && typeof selected.view.render === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user