Skip to content

Commit 1767ff3

Browse files
committed
refactor: remove unnecessary var isLoop
1 parent bac7032 commit 1767ff3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ const dataset = computed<VueUiSparklineDatasetItem[]>(() =>
208208
209209
const lastDatapoint = computed(() => dataset.value.at(-1)?.period ?? '')
210210
211-
const isLoop = shallowRef(settings.value.enableGraphPulseLooping)
212211
const showPulse = shallowRef(true)
213212
const keyboardShortcuts = useKeyboardShortcuts()
214213
@@ -307,8 +306,7 @@ function layEgg() {
307306
showPulse.value = false
308307
nextTick(() => {
309308
showPulse.value = true
310-
isLoop.value = !isLoop.value
311-
settings.value.enableGraphPulseLooping = isLoop.value
309+
settings.value.enableGraphPulseLooping = !settings.value.enableGraphPulseLooping
312310
playEggPulse()
313311
})
314312
}
@@ -357,7 +355,7 @@ const config = computed<VueUiSparklineConfig>(() => {
357355
color: colors.value.borderHover,
358356
pulse: {
359357
show: showPulse.value, // the pulse will not show if prefers-reduced-motion (enforced by vue-data-ui)
360-
loop: isLoop.value,
358+
loop: settings.value.enableGraphPulseLooping,
361359
radius: 1.5,
362360
color: pulseColor.value!,
363361
easing: 'ease-in-out',

0 commit comments

Comments
 (0)