mirror of
https://github.com/misskey-dev/summaly.git
synced 2025-05-11 00:27:35 +09:00
Fix bug
This commit is contained in:
parent
98dd134164
commit
b988f05d71
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "summaly",
|
"name": "summaly",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"description": "Get web page's summary",
|
"description": "Get web page's summary",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -20,9 +20,14 @@ export default async (url: string): Promise<ISummary> => {
|
|||||||
const summary = plugin
|
const summary = plugin
|
||||||
? await plugin.summary(_url)
|
? await plugin.summary(_url)
|
||||||
: await general(_url);
|
: await general(_url);
|
||||||
|
|
||||||
Object.keys(summary).forEach(k => {
|
Object.keys(summary).forEach(k => {
|
||||||
(<any>summary)[k] = (<any>summary)[k].trim();
|
if ((<any>summary)[k]) {
|
||||||
|
(<any>summary)[k] = (<any>summary)[k].trim();
|
||||||
|
if ((<any>summary)[k] == '') {
|
||||||
|
(<any>summary)[k] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return summary;
|
return summary;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user