Skip to content

Commit

Permalink
fix(proxy-list): Fix invalid last added proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Jo-Byr committed Dec 20, 2024
1 parent 37a7fa8 commit 4e0e140
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions vue2-components/src/widgets/TextField/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ export default {
if (!this.model) {
this.model = [];
}
this.dynamicSize = this.model.length + 1;
this.model.length = this.dynamicSize;
if (this.type == 'proxy') {
this.getSimput()
.wsClient.getConnection()
Expand All @@ -158,16 +156,19 @@ export default {
])
.then((proxy_id) => {
if (proxy_id != undefined) {
this.model[this.dynamicSize - 1] = proxy_id;
this.validate(this.dynamicSize);
this.model.push(proxy_id);
this.dirty(this.name);
}
this.dynamicSize = this.model.length;
this.validate(this.dynamicSize);
});
} else {
if (this.newValue === 'null') {
this.model[this.dynamicSize - 1] = null;
this.model.push(null);
} else if (this.newValue === 'same') {
this.model[this.dynamicSize - 1] = this.model[this.dynamicSize - 2];
this.model.push(this.model[this.model.length - 2]);
}
this.dynamicSize = this.model.length;
this.validate(this.dynamicSize);
}
},
Expand Down

0 comments on commit 4e0e140

Please sign in to comment.