This commit is contained in:
syuilo 2017-02-08 14:18:14 +09:00
parent 07cfdb6827
commit 6dfe2912a3

View File

@ -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