From ab60ef47991ff4c4d06917c1f3a0a0b5b9ef1e8b Mon Sep 17 00:00:00 2001 From: ali_khoshnevisan <102961740+ali-khoshnevisan@users.noreply.github.com> Date: Mon, 1 May 2023 17:34:39 +0330 Subject: [PATCH] refactor row (#6) * pageBuilder row media * pageBuilder row style * pageBuilder row style * pageBuilder row style * pageBuilder row style * pageBuilder row style * pageBuilder row style * pageBuilder row style * pageBuilder row * pageBuilder row --- ui/src/components/Row/Row.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/src/components/Row/Row.vue b/ui/src/components/Row/Row.vue index 1ddbe5a..7a2c4e6 100644 --- a/ui/src/components/Row/Row.vue +++ b/ui/src/components/Row/Row.vue @@ -142,11 +142,12 @@ export default { this.boxedInFullWidthStatus = this.deviceWidth <= this.defaultOptions.boxedWidth + this.getPaddingOfBoxedInFullWidth() }, getPaddingOfBoxedInFullWidth() { - if (this.rowOptions.paddingOfBoxedInFullWidth && typeof this.rowOptions.paddingOfBoxedInFullWidth === 'string') { - return Number(this.rowOptions.paddingOfBoxedInFullWidth.split('px')[0]) - } else { - return 0 - } + const padding = this.rowOptions.paddingOfBoxedInFullWidth.split('px') + if (padding && padding.length > 0) { + return Number(padding[0]) + } else { + return 0 + } }, onSubmitElement(widget) { const widgetData = widget.item.type === 'widget' ? widget.item : widget.item.info