mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Fix search page server rendering
This commit is contained in:
parent
9a88c7cd7b
commit
f4ff5908d3
2 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue