Skip to content

Commit 0de24a3

Browse files
committed
simplify code based on AustinMroz review
1 parent f0de9ec commit 0de24a3

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/composables/node/useNodeBadge.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,12 @@ export const useNodeBadge = () => {
7373
onMounted(() => {
7474
const nodePricing = useNodePricing()
7575

76-
let redrawQueued = false
77-
const queueCanvasRedraw = () => {
78-
if (redrawQueued) return
79-
redrawQueued = true
80-
requestAnimationFrame(() => {
81-
redrawQueued = false
82-
app.canvas?.setDirty(true, true)
83-
})
84-
}
85-
8676
watch(
8777
() => nodePricing.pricingRevision.value,
8878
() => {
8979
if (!showApiPricingBadge.value) return
90-
queueCanvasRedraw()
91-
},
92-
{ flush: 'sync' }
80+
app.canvas?.setDirty(true, true)
81+
}
9382
)
9483

9584
extensionStore.registerExtension({

0 commit comments

Comments
 (0)