Skip to content

Commit f3bd29b

Browse files
pdanpdanrstoenescu
authored andcommitted
fix HMR reload problem with parent field (quasarframework#1719)
1 parent 4adfcbd commit f3bd29b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/field/QField.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ export default {
122122
__registerInput (vm) {
123123
this.input = vm
124124
},
125-
__unregisterInput () {
126-
this.input = {}
125+
__unregisterInput (vm) {
126+
if (!vm || vm === this.input) {
127+
this.input = {}
128+
}
127129
},
128130
__getBottomContent (h) {
129131
if (this.hasError && this.errorLabel) {

src/mixins/parent-field.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default {
1515
},
1616
beforeDestroy () {
1717
if (!this.noParentField && this.field) {
18-
this.field.__unregisterInput()
18+
this.field.__unregisterInput(this)
1919
}
2020
}
2121
}

0 commit comments

Comments
 (0)