Skip to content

Commit

Permalink
fix methods counting
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila committed Jan 5, 2024
1 parent 3c0bd74 commit 2a7033b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ 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) {
console.error(`${name}.${method} is not available. Please open an issue in the Spicetify repository to inform us about it.`);
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)) {
Expand Down

0 comments on commit 2a7033b

Please sign in to comment.