mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-30 01:47:17 +09:00
Refactor
This commit is contained in:
parent
07cfdb6827
commit
6dfe2912a3
@ -60,9 +60,7 @@ export default async (url: string, options?: Options): Promise<Result> => {
|
||||
const match = plugins.filter(plugin => plugin.test(_url))[0];
|
||||
|
||||
// Get summary
|
||||
const summary = match
|
||||
? await match.summary(_url)
|
||||
: await general(_url);
|
||||
const summary = await (match ? match.summary : general)(_url);
|
||||
|
||||
return Object.assign(summary, {
|
||||
url: actualUrl
|
||||
|
Loading…
x
Reference in New Issue
Block a user