diff --git a/webroot/js/main.js b/webroot/js/main.js index 420d1bf..2e2def0 100644 --- a/webroot/js/main.js +++ b/webroot/js/main.js @@ -55,11 +55,8 @@ function attachTestConnectionResultHtml(result, $container) { $testResultDiv.append(getKVHtml('Internal error', result, ['text-danger fw-bold'])) } else { if (result['error']) { - if (result['ping']) { - $testResultDiv.append('Status', 'OK', ['text-danger'], `${result['ping']} ms`); - } $testResultDiv.append( - getKVHtml('Status', `Error: ${result['error']}`, ['text-danger']), + getKVHtml('Status', `Error: ${result['error']}`, ['text-danger'], (result['ping'] ? `${result['ping']} ms` : '')), getKVHtml('Reason', result['reason'], ['text-danger']) ) } else {