From b713be5a9ef421498436cc31237a75e12cff276c Mon Sep 17 00:00:00 2001 From: Michael Rowley Date: Thu, 30 Dec 2021 20:36:30 +0000 Subject: [PATCH] Fixed compilation error --- src/core/operations/JWTVerify.mjs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/core/operations/JWTVerify.mjs b/src/core/operations/JWTVerify.mjs index e2b183d0..71859619 100644 --- a/src/core/operations/JWTVerify.mjs +++ b/src/core/operations/JWTVerify.mjs @@ -49,18 +49,15 @@ class JWTVerify extends Operation { */ run(input, args) { const [key, alg] = args; + let algos = []; switch (alg) { case "Any": - const algos = JWT_ALGORITHMS; + algos = JWT_ALGORITHMS; break; case "None": - const algos = [ "none" ]; + algos.push("none"); default: - const algIndex = JWT_ALGORITHMS.indexOf(alg); - if (algIndex === -1) { - throw new OperationError("The JWT verification algorithm provided is not supported."); - } - const algos = JWT_ALGORITHMS[]; + algos.push(alg); break; }