Added a check for the lookup result

This commit is contained in:
Natty 2023-07-30 22:05:08 +02:00
parent e08f58ad4c
commit e4aab98452
No known key found for this signature in database
GPG key ID: BF6CB659ADEE60EC

View file

@ -372,7 +372,7 @@ class MisskeyApiClient extends ApiClient {
let id = null;
for (const user of lookup) {
for (const user of Array.isArray(lookup) ? lookup : []) {
if (user["host"] === handle.instance && user["username"] === handle.name) {
id = user["id"];
break;