From 2af6fa24db62e44065707736b9c7e61e1d7db20e Mon Sep 17 00:00:00 2001 From: mertsincan Date: Thu, 11 Nov 2021 11:48:20 +0300 Subject: [PATCH] Refactor #2406 --- src/components/utils/DomHandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/utils/DomHandler.js b/src/components/utils/DomHandler.js index 6c5381939a..b749b5f1d7 100644 --- a/src/components/utils/DomHandler.js +++ b/src/components/utils/DomHandler.js @@ -34,7 +34,7 @@ export default class DomHandler { static getOuterWidth(el, margin) { if (el) { - let width = el.offsetWidth ?? el.getBoundingClientRect().width; + let width = el.offsetWidth || el.getBoundingClientRect().width; if (margin) { let style = getComputedStyle(el); @@ -48,7 +48,7 @@ export default class DomHandler { static getOuterHeight(el, margin) { if (el) { - let height = el.offsetHeight ?? el.getBoundingClientRect().height; + let height = el.offsetHeight || el.getBoundingClientRect().height; if (margin) { let style = getComputedStyle(el);