Skip to content

Commit ece4bbf

Browse files
committed
validate element visibility utility params
Logically, I think I've got a grip on the issue, but not well enough to recreate it today. Fixes jlmakes#440 (?)
1 parent f7010f4 commit ece4bbf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/is-element-visible.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
export default function isElementVisible(element) {
1+
export default function isElementVisible(element = {}) {
22
const container = this.store.containers[element.containerId]
3+
if (!container) return
4+
35
const viewFactor = Math.max(0, Math.min(1, element.config.viewFactor))
46
const viewOffset = element.config.viewOffset
57

0 commit comments

Comments
 (0)