fix(route/huxiu): Prevent URL parsing error. (#14445)
* Update util.js * Update util.js
This commit is contained in:
@@ -334,7 +334,7 @@ const processItems = async (items, limit, tryGet) => {
|
||||
|
||||
if (item.moment_id) {
|
||||
guid = `huxiu-moment-${item.moment_id}`;
|
||||
link = item.url ?? new URL(`moment/${item.moment_id}.html`, rootUrl).href;
|
||||
link = item.url || new URL(`moment/${item.moment_id}.html`, rootUrl).href;
|
||||
} else if (item.brief_id || /huxiu\.com\/brief\//.test(item.url)) {
|
||||
item.brief_id = item.brief_id ?? item.aid;
|
||||
guid = `huxiu-brief-${item.brief_id}`;
|
||||
|
||||
Reference in New Issue
Block a user