diff --git a/src/js/utils/computed-style.js b/src/js/utils/computed-style.js index 7571c7b76a..b8b062c260 100644 --- a/src/js/utils/computed-style.js +++ b/src/js/utils/computed-style.js @@ -26,7 +26,13 @@ function computedStyle(el, prop) { } if (typeof window.getComputedStyle === 'function') { - const computedStyleValue = window.getComputedStyle(el); + let computedStyleValue; + + try { + computedStyleValue = window.getComputedStyle(el); + } catch (e) { + return ''; + } return computedStyleValue ? computedStyleValue.getPropertyValue(prop) || computedStyleValue[prop] : ''; }