Commit 95b4d16e authored by Ian Jones's avatar Ian Jones

prettier

parent 914a372e
...@@ -117,10 +117,10 @@ function findDOMNode( ...@@ -117,10 +117,10 @@ function findDOMNode(
} }
const hiddenProperties = { const hiddenProperties = {
'display': 'none', display: 'none',
'visibility': 'hidden', visibility: 'hidden',
'content-visibility': 'hidden', 'content-visibility': 'hidden',
} as const } as const
/** /**
* Check if a HTMLElement is hidden or fixed/sticky position * Check if a HTMLElement is hidden or fixed/sticky position
*/ */
...@@ -149,10 +149,11 @@ function shouldSkipElement(element: HTMLElement) { ...@@ -149,10 +149,11 @@ function shouldSkipElement(element: HTMLElement) {
return !element.checkVisibility() return !element.checkVisibility()
} }
return Array.from(Object.entries(hiddenProperties)).some( return (
Array.from(Object.entries(hiddenProperties)).some(
([property, value]) => computedStyle.getPropertyValue(property) === value ([property, value]) => computedStyle.getPropertyValue(property) === value
) || ) || parseFloat(computedStyle.opacity) === 0
parseFloat(computedStyle.opacity) === 0 )
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment