1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00

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

This commit is contained in:
Andrew Kingston 2021-08-19 12:52:13 +01:00
parent 01b28f358a
commit 9e24a76810

View file

@ -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