fix(route/huxiu): Prevent URL parsing error. (#14445)
* Update util.js * Update util.js
This commit is contained in:
parent
fc84c92b95
commit
03d13d27c6
|
|
@ -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}`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue