From e4aab984522400f7685797ffea8efe3fabaa920a Mon Sep 17 00:00:00 2001 From: Natty Date: Sun, 30 Jul 2023 22:05:08 +0200 Subject: [PATCH] Added a check for the lookup result --- create-circle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create-circle.js b/create-circle.js index 1c398cd..f66bbe9 100644 --- a/create-circle.js +++ b/create-circle.js @@ -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;