From 5245f27db7c04b97388edb3142dcf1090fd81af2 Mon Sep 17 00:00:00 2001 From: Chris Sandvik Date: Wed, 28 Jul 2021 14:17:45 -0400 Subject: [PATCH] Fix picture conversion function in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e16e6cb..482a60b 100644 --- a/README.md +++ b/README.md @@ -273,10 +273,10 @@ The `picture` tag contains an array buffer of all the bytes of the album artwork ```javascript const { data, format } = result.tags.picture; let base64String = ""; -for (const i = 0; i < data.length; i++) { +for (let i = 0; i < data.length; i++) { base64String += String.fromCharCode(data[i]); } -img.src = `data:${data.format};base64,${window.btoa(base64String)}`; +img.src = `data:${format};base64,${window.btoa(base64String)}`; ``` ### HTTP Access Control (CORS)