File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,9 @@ onMounted(() => {
9898 if (rainEl .value ) rainEl .value .appendChild (blockIcon)
9999
100100 setTimeout (() => {
101- rainEl .value ? .removeChild (blockIcon)
101+ if (rainEl .value && rainEl .value ? .contains (blockIcon)) {
102+ rainEl .value .removeChild (blockIcon)
103+ }
102104 }, 5_000 )
103105 }, 500 )
104106})
Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ const getHistogram = async (sectorOffset) => {
3232 period: " hour" ,
3333 from: parseInt (DateTime .now ().minus ({ hours: 24 - sectorOffset }).ts / 1_000 ),
3434 })
35- histogram .value = data .reverse ()
35+
36+ if (! data? .length ) return
37+
38+ histogram .value = data? .reverse ()
3639}
3740
3841const buildHistogram = async () => {
@@ -49,6 +52,8 @@ const buildHistogram = async () => {
4952
5053 await getHistogram (sectorOffset)
5154
55+ if (! histogram .value .length ) return
56+
5257 const items = [... histogram .value ]
5358
5459 let target = 0
@@ -138,7 +143,7 @@ const getSectorName = (item) => {
138143 < / Flex>
139144 < / Flex>
140145
141- < Skeleton w= " 20" h= " 12" / >
146+ < Skeleton v - if = " isLoading " w= " 20" h= " 12" / >
142147 < / Flex>
143148 < / Flex>
144149
You can’t perform that action at this time.
0 commit comments