code format

This commit is contained in:
Eraldo Hasanaj
2019-02-13 18:17:59 +01:00
parent 1a320ba8cf
commit fbbbbd6042

View File

@@ -259,7 +259,7 @@ export class ProcessState {
return { ...process, users: users };
} else {
// If users found, add new breadcrumb for searched term
let currentBreadcrumbs = [...process.breadcrumbs];
const currentBreadcrumbs = [...process.breadcrumbs];
const missingBreadcrumb = currentBreadcrumbs.filter((breadcrumb: Breadcrumb) => breadcrumb.path === '/customer-search');
if (missingBreadcrumb.length === 0) {
currentBreadcrumbs.push(
@@ -271,14 +271,14 @@ export class ProcessState {
name: payload,
path: '/customer-search-result'
}
)
);
} else {
currentBreadcrumbs.push(
{
name: payload,
path: '/customer-search-result'
}
)
);
}
if (users.length > 0 && currentBreadcrumbs.length > 1) {
@@ -659,7 +659,7 @@ export class ProcessState {
console.log(indexOfCurrentBreadcrumb);
for (let x = breadcrumbs.length - 1; x >= 0; x--) {
if (indexOfCurrentBreadcrumb < x) {
ctx.dispatch(new actions.ChangeCurrentRoute(breadcrumbs[x-1].path));
ctx.dispatch(new actions.ChangeCurrentRoute(breadcrumbs[x - 1].path));
breadcrumbs.pop();
}
}