From 2656eccd1bc398b30e0573ccaac0ce069c3d9657 Mon Sep 17 00:00:00 2001 From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com> Date: Thu, 14 Sep 2023 05:22:10 +0200 Subject: [PATCH] fix(plugins/core): empty scope listing --- source/plugins/core/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/core/index.mjs b/source/plugins/core/index.mjs index 57c65261..facfa176 100644 --- a/source/plugins/core/index.mjs +++ b/source/plugins/core/index.mjs @@ -125,7 +125,7 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q //Token scopes try { - computed.token.scopes = conf.settings.notoken ? [] : (await rest.request("HEAD /")).headers["x-oauth-scopes"].split(", ") + computed.token.scopes = conf.settings.notoken ? [] : (await rest.request("HEAD /")).headers["x-oauth-scopes"]?.split(", ") ?? [] } catch (error) { console.debug(error)