fix: guard certificate and key against undefined before join

This commit is contained in:
MHSanaei
2026-05-14 17:46:24 +02:00
parent e4218a1029
commit 9b0fd047cb
+2 -2
View File
@@ -827,8 +827,8 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
} else { } else {
return new TlsStreamSettings.Cert( return new TlsStreamSettings.Cert(
false, '', '', false, '', '',
json.certificate.join('\n'), Array.isArray(json.certificate) ? json.certificate.join('\n') : (json.certificate ?? ''),
json.key.join('\n'), Array.isArray(json.key) ? json.key.join('\n') : (json.key ?? ''),
json.oneTimeLoading, json.oneTimeLoading,
json.usage, json.usage,
json.buildChain, json.buildChain,