Skip to content

Commit

Permalink
Fixed login failed error
Browse files Browse the repository at this point in the history
  • Loading branch information
grafitto committed Feb 14, 2022
1 parent 1df3d67 commit cf4c8fe
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions app/react/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,11 @@ function getPageIndexRoute(customHomePage) {

function getIndexRoute(_nextState, callBack) {
const state = store.getState();
const homePageSetting = state.settings.collection.get('home_page');
const homePageSetting = state.settings.collection.get('home_page') || '';
const defaultView = state.settings.collection.get('defaultLibraryView');

if (!validateHomePageRoute(homePageSetting)) {
return callBack(
null,
getDefaultLibraryComponent(state.settings.collection.get('defaultLibraryView'))
);
return callBack(null, getDefaultLibraryComponent(defaultView));
}

const customHomePage = homePageSetting ? homePageSetting.split('/').filter(v => v) : [];
Expand All @@ -125,10 +123,7 @@ function getIndexRoute(_nextState, callBack) {
});
}

return callBack(
null,
getDefaultLibraryComponent(state.settings.collection.get('defaultLibraryView'))
);
return callBack(null, getDefaultLibraryComponent(defaultView));
}

const routes = (
Expand Down

0 comments on commit cf4c8fe

Please sign in to comment.