Fix bug in getPageNameFromPath

This commit is contained in:
Tom Raithel
2017-04-05 09:17:30 +02:00
parent 1b7286a7d5
commit 7a1eaa9426
2 changed files with 4 additions and 3 deletions

View File

@@ -57,3 +57,4 @@ If an item is overwritten in a new release, the attributes from the new item are
- [ ] Add mobile navigation and search
- [ ] Create more react components for already existing CSS comps
- [ ] Refactor hardcoded subfolder in routing
- [ ] Unit test for radar generation :see_no_evil:

View File

@@ -11,11 +11,11 @@ import {isMobileViewport} from '../common/config'
// Remove .html and map / to index
const getPageNameFromPath = (path) => {
if (path === path.sep) {
if (path === '/') {
return 'index';
}
return path.substring(1, path.length - 5);
}
};
const historyManager = store => {
const history = createHistory({
@@ -37,7 +37,7 @@ const historyManager = store => {
}
return next(action);
}
}
};
let reloadTimeout;
let wasMobileViewport = isMobileViewport();