From 5d39842831ea5e51987d7b08db81adc3a5efbecd Mon Sep 17 00:00:00 2001 From: Jona <8698248+jonamil@users.noreply.github.com> Date: Fri, 19 Jul 2024 18:55:45 +0200 Subject: [PATCH] Update initial error face asset index --- src/components/TheLinkColumnBody.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/TheLinkColumnBody.vue b/src/components/TheLinkColumnBody.vue index 01ef6ea..5f6db89 100644 --- a/src/components/TheLinkColumnBody.vue +++ b/src/components/TheLinkColumnBody.vue @@ -117,10 +117,9 @@ if (!view.isSafari) { }); } -const maxErrorAssetIndex = 5; -const errorAssetIndexes = [...Array(maxErrorAssetIndex + 1).keys()]; +const errorAssetIndexes = [...Array(6 /* highest error asset index + 1 */).keys()]; -let currentErrorAssetIndex = 0; +let currentErrorAssetIndex = -1; const currentErrorAsset = ref(undefined); watch( @@ -129,6 +128,7 @@ watch( const otherErrorAssetIndexes = errorAssetIndexes.filter( (asset) => asset !== currentErrorAssetIndex ); + currentErrorAssetIndex = otherErrorAssetIndexes[Math.floor(Math.random() * otherErrorAssetIndexes.length)];