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

@@ -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();