Skip to content

Commit 5b36b9c

Browse files
authored
fix(input-number): don't use this.inputRef when the component is already unmounted (#4103)
1 parent 7109a06 commit 5b36b9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/vc-input-number/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export default defineComponent({
292292
});
293293
const value = this.getCurrentValidValue(this.$data.inputValue);
294294
const newValue = this.setValue(value);
295-
if (this.$attrs.onBlur) {
295+
if (this.$attrs.onBlur && this.inputRef) {
296296
const originValue = this.inputRef.value;
297297
const inputValue = this.getInputDisplayValue({ focused: false, sValue: newValue });
298298
this.inputRef.value = inputValue;

0 commit comments

Comments
 (0)