small fixes

This commit is contained in:
2022-01-27 18:21:13 +01:00
parent 8ff853b688
commit e9088d1878
2 changed files with 2 additions and 2 deletions

View File

@@ -229,7 +229,7 @@ export function App() {
<ProgressBar className="container-padding mt-2" now={progressMap.get(message[0])} variant="primary" /> : <ProgressBar className="container-padding mt-2" now={progressMap.get(message[0])} variant="primary" /> :
null null
} }
{message[1] && message[1] !== 'Done!' ? {message[0] && message[1] && message[1] !== 'Done!' ?
<Row> <Row>
<Col> <Col>
<Button variant={darkMode ? 'dark' : 'light'} className="float-end" active size="sm" onClick={() => abort(message[0])}> <Button variant={darkMode ? 'dark' : 'light'} className="float-end" active size="sm" onClick={() => abort(message[0])}>

View File

@@ -10,7 +10,7 @@ export function validateDomain(domainName: string): boolean {
export function ellipsis(str: string, lim: number): string { export function ellipsis(str: string, lim: number): string {
if (str) { if (str) {
return str.length > lim ? `${str.substr(0, lim)}...` : str return str.length > lim ? `${str.substring(0, lim)}...` : str
} }
return '' return ''
} }