Fix bug in getPageNameFromPath
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user