From 819d74cf10b2dbdff517f22b791c739703de96da Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 16 Apr 2024 15:18:30 +0200 Subject: [PATCH] fix hysteria2 up-down change #92 --- frontend/src/components/protocols/Hysteria2.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/protocols/Hysteria2.vue b/frontend/src/components/protocols/Hysteria2.vue index 00e07d1..6c77c61 100644 --- a/frontend/src/components/protocols/Hysteria2.vue +++ b/frontend/src/components/protocols/Hysteria2.vue @@ -73,11 +73,11 @@ export default { computed: { down_mbps: { get() { return this.hysteria2.down_mbps ? this.hysteria2.down_mbps : 0 }, - set(newValue:any) { this.hysteria2.down_mbps = newValue.length == 0 ? undefined : this.hysteria2.down_mbps } + set(newValue:number) { this.hysteria2.down_mbps = newValue?? undefined } }, up_mbps: { get() { return this.hysteria2.up_mbps ? this.hysteria2.up_mbps : 0 }, - set(newValue:any) { this.hysteria2.up_mbps = newValue.length == 0 ? undefined : this.hysteria2.up_mbps } + set(newValue:number) { this.hysteria2.up_mbps = newValue?? undefined } }, optionObfs: { get(): boolean { return this.hysteria2.obfs != undefined },