Skip to content

Commit b894144

Browse files
committed
[#28] improve threshold field update
1 parent a87b869 commit b894144

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/ProfilerPageCallGraph/ProfilerPageCallGraph.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,14 @@ export default defineComponent({
110110
setThreshold(threshold: number): void {
111111
this.metricLoading = true;
112112
113+
const prevThreshold = this.threshold;
114+
this.threshold = threshold;
115+
113116
return debounce(() => {
114-
if (!threshold || this.threshold === threshold) {
117+
if (!threshold || prevThreshold === threshold) {
115118
return;
116119
}
117120
118-
this.threshold = threshold;
119-
120121
setTimeout(() => {
121122
this.renderGraph();
122123
this.metricLoading = false;

0 commit comments

Comments
 (0)