Browse Source

Ensure client preview indicator doesn't crash when encountering incorrect node types

pull/2441/head
Andrew Kingston 5 years ago
parent
commit
9e24a76810
  1. 2
      packages/client/src/components/preview/IndicatorSet.svelte

2
packages/client/src/components/preview/IndicatorSet.svelte

@ -61,7 +61,7 @@
// Sanity limit of 100 active indicators
const children = Array.from(parents)
.map(parent => parent?.childNodes?.[0])
.filter(child => child != null)
.filter(node => node?.nodeType === 1)
.slice(0, 100)
// If there aren't any nodes then reset

Loading…
Cancel
Save