Calling function within a promise


#1

I’m trying to call a function within a promise and I keep getting the error of “Cannot read property ‘getPlaceId’ of undefined”

Can someone please explain why?


#2
const that = this;

write this code as the first line before

var promise = new Promise...

#3

Omg that was such a…error. Thank you so much!!


#4

Just convert your function()… Into an arrow function and you will not need that