Sfoglia il codice sorgente

Use the ? operator

Shane Kilkelly 10 anni fa
parent
commit
8be95a5169
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      server-ce/settings.coffee

+ 1 - 1
server-ce/settings.coffee

@@ -416,7 +416,7 @@ if process.env["SHARELATEX_LDAP_HOST"]
 
 
 		if typeof(ca)  == 'string'
 		if typeof(ca)  == 'string'
 			ca_paths = [ca]
 			ca_paths = [ca]
-		else if typeof(ca) == 'object' && ca.length?
+		else if typeof(ca) == 'object' && ca?.length?
 			ca_paths = ca
 			ca_paths = ca
 		else
 		else
 			console.error "problem parsing SHARELATEX_LDAP_TLS_OPTS_CA_PATH"
 			console.error "problem parsing SHARELATEX_LDAP_TLS_OPTS_CA_PATH"