fix: wallet chart render racecondition (#3595)
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -102,9 +102,9 @@ window.app.component('lnbits-wallet-charts', {
|
||||
if (this.walletBalanceInOut) {
|
||||
this.walletBalanceInOut.destroy()
|
||||
}
|
||||
this.walletBalanceInOut = new Chart(
|
||||
this.$refs.walletBalanceInOut.getContext('2d'),
|
||||
{
|
||||
const ref = this.$refs.walletBalanceInOut
|
||||
if (!ref) return
|
||||
this.walletBalanceInOut = new Chart(ref.getContext('2d'), {
|
||||
type: 'bar',
|
||||
options: this.barOptions,
|
||||
data: {
|
||||
@@ -124,16 +124,15 @@ window.app.component('lnbits-wallet-charts', {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
drawPaymentInOut(data, labels) {
|
||||
if (this.walletPaymentInOut) {
|
||||
this.walletPaymentInOut.destroy()
|
||||
}
|
||||
this.walletPaymentInOut = new Chart(
|
||||
this.$refs.walletPaymentInOut.getContext('2d'),
|
||||
{
|
||||
const ref = this.$refs.walletPaymentInOut
|
||||
if (!ref) return
|
||||
this.walletPaymentInOut = new Chart(ref.getContext('2d'), {
|
||||
type: 'bar',
|
||||
options: this.barOptions,
|
||||
data: {
|
||||
@@ -151,14 +150,14 @@ window.app.component('lnbits-wallet-charts', {
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
drawBalanceChart(data, labels) {
|
||||
const ref = this.$refs.walletBalanceChart
|
||||
if (this.walletBalanceChart) {
|
||||
this.walletBalanceChart.destroy()
|
||||
}
|
||||
const ref = this.$refs.walletBalanceChart
|
||||
if (!ref) return
|
||||
this.walletBalanceChart = new Chart(ref.getContext('2d'), {
|
||||
type: 'line',
|
||||
options: {
|
||||
|
||||
Reference in New Issue
Block a user