Fix search page server rendering

This commit is contained in:
Kimmo Puputti 2017-03-22 15:02:29 +02:00
parent 9a88c7cd7b
commit f4ff5908d3
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@ const url = require('url');
const { matchPathname, configureStore } = require('./importer');
exports.loadData = function(requestUrl, sdk) {
const { pathname, query } = url.parse(requestUrl, true);
const { pathname, query } = url.parse(requestUrl);
const matchedRoutes = matchPathname(pathname);
const store = configureStore(sdk);

View file

@ -13,8 +13,8 @@ export const createSlug = str => encodeURIComponent(str.toLowerCase().split(' ')
* @return {Number|null} number parsed from the string, null if not a number
*/
export const parseFloatNum = str => {
const num = window.parseFloat(str);
return window.isNaN(num) ? null : num;
const num = parseFloat(str);
return isNaN(num) ? null : num;
};
/**