From 810fd6d3bef0ff1f66c21df390d860085644cd29 Mon Sep 17 00:00:00 2001 From: Ganesh Annan Date: Tue, 17 Sep 2024 22:15:00 +0200 Subject: [PATCH] Simplify header check. Co-authored-by: Dave Longley --- lib/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers.js b/lib/helpers.js index 0372919..ac62c61 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -220,7 +220,7 @@ function _getNFCRenderingTemplate2024({credential}) { } async function _decodeMultibase(input) { - const multibaseHeader = input.slice(0, 1); + const multibaseHeader = input[0]; const decoder = multibaseDecoders.get(multibaseHeader); if(!decoder) { throw new Error(`Multibase header "${multibaseHeader}" not supported.`);