Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-10-21 11:40:29 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-10-21 11:40:29 +0300
commitd16ad111362487ee00930fdb5929ada68b6c62e0 (patch)
tree6b18b861e2ef35c305e761ac080670391c07be87
parent6c27e4177d675bedc5f81da71f671b0a9c923b8d (diff)
fix outbound noises
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
-rw-r--r--web/assets/js/model/outbound.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index 1011278d..870f555f 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -875,16 +875,16 @@ Outbound.FreedomSettings = class extends CommonClass {
json.domainStrategy,
json.redirect,
json.fragment ? Outbound.FreedomSettings.Fragment.fromJson(json.fragment) : undefined,
- json.noises ? json.noises.map(noise => Outbound.FreedomSettings.Noise.fromJson(noise)) : [new Outbound.FreedomSettings.Noise()],
+ json.noises ? json.noises.map(noise => Outbound.FreedomSettings.Noise.fromJson(noise)) : undefined,
);
}
toJson() {
return {
domainStrategy: ObjectUtil.isEmpty(this.domainStrategy) ? undefined : this.domainStrategy,
- redirect: this.redirect,
+ redirect: ObjectUtil.isEmpty(this.redirect) ? undefined: this.redirect,
fragment: Object.keys(this.fragment).length === 0 ? undefined : this.fragment,
- noises: Outbound.FreedomSettings.Noise.toJsonArray(this.noises),
+ noises: this.noises.length === 0 ? undefined : Outbound.FreedomSettings.Noise.toJsonArray(this.noises),
};
}
};
@@ -937,10 +937,6 @@ Outbound.FreedomSettings.Noise = class extends CommonClass {
delay: this.delay,
};
}
-
- static toJsonArray(noises) {
- return noises.map(noise => noise.toJson());
- }
};
Outbound.BlackholeSettings = class extends CommonClass {