defold / extension-fbinstant

Facebook Instant Games extension for the Defold game engine
https://defold.com/extension-fbinstant/
MIT License
38 stars 20 forks source link

choose_context fails if optional "options" parameter is omitted #60

Closed totebo closed 5 years ago

totebo commented 5 years ago

This fails: fbinstant.choose_context(nil, callback)

This works: fbinstant.choose_context("{}", callback)

britzl commented 5 years ago

Thanks. Will take a look straight away!

britzl commented 5 years ago

This will work:

fbinstant.choose_context(callback)

The readme specifies:

fbinstant.choose_context([options,] callback)

Which means that you can omit the options argument completely. I should probably add support for it being nil as well though...

totebo commented 5 years ago

Oh, I have never seen completely optional parameters before, nice one!