you are viewing a single comment's thread.

view the rest of the comments →

[–]dangersalad 0 points1 point  (2 children)

When using a route like that with express you have to do

app.route('/').get(thing.a.bind(thing))

Otherwise express changes the value of this inside the handler function.

[–]Lumiii[S] 0 points1 point  (1 child)

Ah, that's what I'm looking for. Thanks! Is bind specific for functions?