Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving yields a TypeError with specfic queries/levels #34

Open
cl3847 opened this issue Feb 12, 2024 · 0 comments
Open

Resolving yields a TypeError with specfic queries/levels #34

cl3847 opened this issue Feb 12, 2024 · 0 comments

Comments

@cl3847
Copy link

cl3847 commented Feb 12, 2024

For example:

const results = await gd.levels.search({query: "100576164"}, 1);
await results[0].resolve());
TypeError: Cannot read properties of undefined (reading '1')
  at new CustomSong (/project/node_modules/gd.js/lib/entities/level.js:169:21)
  at Level.SearchedLevel (/project/node_modules/gd.js/lib/entities/level.js:283:19)
  at new Level (/project/node_modules/gd.js/lib/entities/level.js:424:24)
  at SearchedLevel.<anonymous> (/project/node_modules/gd.js/lib/entities/level.js:334:51)
  at step (/project/node_modules/gd.js/lib/entities/level.js:61:23)
  at Object.next (/project/node_modules/gd.js/lib/entities/level.js:42:53)
  at fulfilled (/project/node_modules/gd.js/lib/entities/level.js:33:58)

will yield this error, but other queries like 10565740 will work fine every time.

This also happens with some level names:

await gd.levels.search({query: "backboard"}, 1); // the same level as the ID used in the first example

From some digging, it seems like d isn't being properly populated sometimes?

console.log(d); // { '-': undefined }

Any help would be appreciated!

@cl3847 cl3847 changed the title Searching yields a TypeError with specfic queries/levels Resolving yields a TypeError with specfic queries/levels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant