From f4ff5908d3b3f42f1478041fa4b509a23d793fbc Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Wed, 22 Mar 2017 15:02:29 +0200 Subject: [PATCH] Fix search page server rendering --- server/dataLoader.js | 2 +- src/util/urlHelpers.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/dataLoader.js b/server/dataLoader.js index 91e86744..7f17051c 100644 --- a/server/dataLoader.js +++ b/server/dataLoader.js @@ -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); diff --git a/src/util/urlHelpers.js b/src/util/urlHelpers.js index f5f68528..24492583 100644 --- a/src/util/urlHelpers.js +++ b/src/util/urlHelpers.js @@ -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; }; /**