kravetsone / enkaNetwork

Node JS enka.network API wrapper written on TypeScript which provides localization, caching and convenience.
https://kravets.gitbook.io/enkanetwork
GNU General Public License v3.0
18 stars 5 forks source link

TypeError: Cannot read properties of undefined (reading 'map') #3

Closed kadistudio closed 1 year ago

kadistudio commented 1 year ago

i noticed that when fetching a user (especially using a begineers namecard (Genshin Impact: A New World) an error occurs (see attached picture).

const userEnka = await enka.fetchUser(uid);

how long does the module update? because when i change something information in the game, when i try to console.log(userEnka) there's nothing change with the information.

image

kravetsone commented 1 year ago

how long does the module update? because when i change something information in the game, when i try to console.log(userEnka) there's nothing change with the information.

On the part of the enka network API, the response is cached and updated every 2 minutes. Caching by the library is calculated just from the life of the enka network api cache.

Sorry. I'm coming back from college and will be able to investigate the error a little later.

kravetsone commented 1 year ago

Fixed in enkaNetwork@1.1.5

Thank you for your cooperation! At the moment dummy accounts do not cause errors but contain a lot of undefined values. (as it should have been)

image