[HOME] Редактор мебели: защита рендера (показывает текст ошибки вместо «Ошибка конфигурации»), ресурс v2
lint / hygiene (push) Failing after 18s
lint / hygiene (push) Failing after 18s
This commit is contained in:
1 parent
14242e1549
commit
96275223f6
1 file changed
+6
@@ -70,6 +70,12 @@ class FurnitureCard extends HTMLElement {
|
||||
}
|
||||
|
||||
_render() {
|
||||
try { this._renderSafe(); } catch (err) {
|
||||
this.shadowRoot.innerHTML = '<div style=\'padding:16px;color:#ffb4b4;font:14px system-ui\'>Ошибка редактора: ' + (err && err.message ? err.message : err) + '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
_renderSafe() {
|
||||
const b = this._bounds();
|
||||
const W = 720, H = 520;
|
||||
const pad = 30;
|
||||
|
||||
Reference in new issue
Block a user