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
|
- [ ] Add mobile navigation and search
|
||||||
- [ ] Create more react components for already existing CSS comps
|
- [ ] Create more react components for already existing CSS comps
|
||||||
- [ ] Refactor hardcoded subfolder in routing
|
- [ ] 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
|
// Remove .html and map / to index
|
||||||
const getPageNameFromPath = (path) => {
|
const getPageNameFromPath = (path) => {
|
||||||
if (path === path.sep) {
|
if (path === '/') {
|
||||||
return 'index';
|
return 'index';
|
||||||
}
|
}
|
||||||
return path.substring(1, path.length - 5);
|
return path.substring(1, path.length - 5);
|
||||||
}
|
};
|
||||||
|
|
||||||
const historyManager = store => {
|
const historyManager = store => {
|
||||||
const history = createHistory({
|
const history = createHistory({
|
||||||
@@ -37,7 +37,7 @@ const historyManager = store => {
|
|||||||
}
|
}
|
||||||
return next(action);
|
return next(action);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
let reloadTimeout;
|
let reloadTimeout;
|
||||||
let wasMobileViewport = isMobileViewport();
|
let wasMobileViewport = isMobileViewport();
|
||||||
|
|||||||
Reference in New Issue
Block a user