1
0
Fork 0
mirror of synced 2024-07-08 15:56:23 +12:00

Ensure links prop is always an array when configuring layout links

This commit is contained in:
Andrew Kingston 2021-12-03 11:38:49 +00:00
parent aecc29b4d7
commit e695396bb8

View file

@ -17,6 +17,7 @@
const flipDurationMs = 150 const flipDurationMs = 150
let dragDisabled = true let dragDisabled = true
$: links = links || []
$: links.forEach(link => { $: links.forEach(link => {
if (!link.id) { if (!link.id) {
link.id = generate() link.id = generate()