Improved actor scraping and display.
This commit is contained in:
@@ -252,9 +252,13 @@ async function fetchProfile(actorName) {
|
||||
}, { encodeJSON: true });
|
||||
|
||||
if (res.ok) {
|
||||
const actor = res.body.hits.hits.find(hit => hit._source.name === actorName);
|
||||
const actor = res.body.hits.hits.find(hit => hit._source.name.toLowerCase() === actorName.toLowerCase());
|
||||
|
||||
return scrapeProfile(actor._source);
|
||||
if (actor) {
|
||||
return scrapeProfile(actor._source);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return res.status;
|
||||
|
||||
Reference in New Issue
Block a user