Litarvan / pronote-api

(Tout langage) API compatible Pronote 2020/2021
193 stars 87 forks source link

fix: convert empty object to empty array #253

Closed Androz2091 closed 3 years ago

Androz2091 commented 3 years ago

When we use a location without any establishments, instead of returning an empty array, it returns... an empty object. It's pretty weird, you can try:


// toulouse
pronote.geo('43', '1');
/*
[ EstablishmentObject, EstablishmentObject, ... ]
*/

// new york
pronote.geo('37', '122');
/*
{}
*/

instead of something like []