Skip to content

Commit fa03c4e

Browse files
committed
fix: place handler in script
1 parent 10fb861 commit fa03c4e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ function openChartModal() {
1919
nextTick(() => chartModal.open())
2020
}
2121
22+
function handleCloseChartModal() {
23+
isChartModalOpen.value = false
24+
isChartModalReady.value = false
25+
}
26+
2227
const { fetchPackageDownloadEvolution } = useCharts()
2328
2429
const { accentColors, selectedAccentColor } = useAccentColor()
@@ -252,10 +257,7 @@ const config = computed(() => {
252257
v-if="isChartModalOpen"
253258
@close="isChartModalOpen = false"
254259
@opened="isChartModalReady = true"
255-
@closed="
256-
isChartModalOpen = false
257-
isChartModalReady = false
258-
"
260+
@closed="handleCloseChartModal"
259261
>
260262
<!-- The chart is only rendered when the dialog element has fully transitioned, to avoid the chart from triggering too early its internal auto-sizing -->
261263
<PackageDownloadAnalytics

0 commit comments

Comments
 (0)