From 2a7033b45f88d39368fcf08adeb90357608f3ee7 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sat, 6 Jan 2024 01:08:46 +0500 Subject: [PATCH] fix methods counting --- jsHelper/spicetifyWrapper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsHelper/spicetifyWrapper.js b/jsHelper/spicetifyWrapper.js index 663a8d0353..31c382bb47 100644 --- a/jsHelper/spicetifyWrapper.js +++ b/jsHelper/spicetifyWrapper.js @@ -125,7 +125,7 @@ window.Spicetify = { test: () => { function checkObject(object) { const { objectToCheck, methods, name } = object; - let count = methods.length; + let count = methods.size; for (const method of methods) { if (objectToCheck[method] === undefined || objectToCheck[method] === null) { @@ -133,7 +133,7 @@ window.Spicetify = { count--; } } - console.log(`${count}/${methods.length} ${name} methods and objects are OK.`); + console.log(`${count}/${methods.size} ${name} methods and objects are OK.`); for (const key of Object.keys(objectToCheck)) { if (!methods.has(key)) {