feat(xo-web/home): remove unnecessary condition (#5116)

Introduced by f736381933

Backup filter: remove the needless condition to go to the first page.
This commit is contained in:
Rajaa.BARHTAOUI 2020-06-29 15:24:28 +02:00 committed by GitHub
parent b6a6694abf
commit 42dd1efb41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -924,13 +924,13 @@ export default class Home extends Component {
_setBackupFilter = backupFilter => {
const { pathname, query } = this.props.location
const isAll = backupFilter === 'all'
this.context.router.push({
pathname,
query: {
...query,
backup: isAll ? undefined : backupFilter === 'backedUpVms',
p: isAll ? 1 : undefined,
backup:
backupFilter === 'all' ? undefined : backupFilter === 'backedUpVms',
p: 1,
s_backup: undefined,
},
})