Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit b10c3a8

Browse files
committed
fix(explore): crash by url params
1 parent abf1b28 commit b10c3a8

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

config/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"//--- contact configs ---//": "",
6060
"EMAIL_SUPPORT": "coderplanets@outlook.com",
6161
"// GRAPHQL_ENDPOINT": "https://api.coderplanets.com/graphiql",
62-
"BUILD_VERSION": "v2.1.2",
62+
"BUILD_VERSION": "v2.1.3",
6363
"// 1000 * 60 * 10 = 10 mins": "",
6464
"SSR_CACHE_TIME": 60000
6565
}

deploy/production/web.tar.gz

-216 Bytes
Binary file not shown.

utils/ssr.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ export const ssrBaseStates = (resp) => {
5353
*/
5454
export const ssrGetParam = (context, key) => {
5555
const { resolvedUrl, req } = context
56-
return getQueryFromUrl(key, resolvedUrl) || req.params[key]
56+
const params = req.params || {}
57+
58+
return getQueryFromUrl(key, resolvedUrl) || params[key]
5759
}
5860

5961
export const ssrFetchPrepare = (context, opt) => {

0 commit comments

Comments
 (0)