From 481896e392aebb7dc1dc801ab08dee54fb3274c4 Mon Sep 17 00:00:00 2001 From: hiawui Date: Fri, 24 Jun 2022 20:18:13 +0800 Subject: [PATCH] fix: exception when moving invalid bar --- src/bar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bar.js b/src/bar.js index ee7ffda..2a47f2c 100644 --- a/src/bar.js +++ b/src/bar.js @@ -368,6 +368,7 @@ export default class Bar { } update_progressbar_position() { + if (this.invalid) return; this.$bar_progress.setAttribute('x', this.$bar.getX()); this.$bar_progress.setAttribute( 'width', @@ -389,6 +390,7 @@ export default class Bar { } update_handle_position() { + if (this.invalid) return; const bar = this.$bar; this.handle_group .querySelector('.handle.left')