[FIX] web_editor: solve bug when removing all columns of the footer
When removing all the columns of a block with no parent, like the footer, a traceback was appearing because updateUIVisibility was trying to access the properties of an inexisting parent. This commit fixes that by first checking if the parent exists. task-2973198 X-original-commit: 3e7ad08581295af6a986ba2b81ec25d9cd78e91d Part-of: odoo/odoo#102525
This commit is contained in:
committed by
qsm-odoo
parent
fcca35ff63
commit
5a93e4fe0b
@@ -4430,7 +4430,7 @@ registry.sizing = SnippetOptionWidget.extend({
|
||||
|
||||
const isMobileView = this.$target[0].ownerDocument.defaultView.frameElement.clientWidth < 768;
|
||||
const isGrid = this.$target[0].classList.contains('o_grid_item');
|
||||
if (this.$target[0].parentNode.classList.contains('row')) {
|
||||
if (this.$target[0].parentNode && this.$target[0].parentNode.classList.contains('row')) {
|
||||
// Hiding/showing the correct resize handles if we are in grid mode
|
||||
// or not.
|
||||
for (const handleEl of this.$handles) {
|
||||
|
||||
Reference in New Issue
Block a user