google-places icon indicating copy to clipboard operation
google-places copied to clipboard

Cannot read property 'sort' of undefined

Open DragonHiveSolutions opened this issue 4 years ago • 1 comments

I have set everything up as instructed, however, am now receiving the following error in the console...

Uncaught TypeError: Cannot read property 'sort' of undefined at sort_by_date (google-places.js:141) at renderReviews (google-places.js:177) at google-places.js:65 at google-places.js:135 at places_impl.js:46 at places_impl.js:44 at Mp.e [as o] (places_impl.js:27) at Object.c [as _c3k8wv] (common.js:67) at PlaceService.GetPlaceDetails?2sen-US&10e3&14m1&1sChIJwVvhYVOSekgRYxdRMwRV_UU&17m1&2e1&callback=xdc._c3k8wv&key=AIzaSyB4sUcbLV4bRem7xI6gt-u_qQkRtsbIcRA&token=98149:1

I'm at a loss of what to do here. I followed something suggested in another issue posted here, by adding a billing account to my google cloud platform but it still hasn't resolved the error. Any suggestions?

DragonHiveSolutions avatar Mar 26 '20 21:03 DragonHiveSolutions

It looks like the reviews key in the place data from the api response is undefined. Do you have any reviews?

bpedroza avatar Mar 27 '20 15:03 bpedroza