File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/server/system_services Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -781,12 +781,12 @@ function update_dns_servers(req) {
781781 throw new RpcError ( 'OFFLINE_SERVER' , 'Server is disconnected' ) ;
782782 }
783783 const config_to_compare = [
784- dns_servers_config . dns_servers ? dns_servers_config . dns_servers . sort ( ) : undefined ,
785- dns_servers_config . search_domains ? dns_servers_config . search_domains . sort ( ) : undefined
784+ dns_servers_config . dns_servers ? dns_servers_config . dns_servers . sort ( ) : [ ] ,
785+ dns_servers_config . search_domains ? dns_servers_config . search_domains . sort ( ) : [ ]
786786 ] ;
787787 // don't update servers that already have the dame configuration
788788 target_servers = target_servers . filter ( srv => {
789- const { dns_servers, search_domains } = srv ;
789+ const { dns_servers = [ ] , search_domains = [ ] } = srv ;
790790 return ! _ . isEqual ( config_to_compare , [ dns_servers . sort ( ) , search_domains . sort ( ) ] ) ;
791791 } ) ;
792792 if ( ! target_servers . length ) {
You can’t perform that action at this time.
0 commit comments