At client initialization time, if the initial flag polling request failed, it would cause an unhandled promise rejection unless the application had called waitForInitialization() and provided an error handler for the promise that was returned by that method. While that is correct behavior if the application did call waitForInitialization() (any promise that might be rejected should have an error handler attached), it is inappropriate if the application did not call waitForInitialization() at all-- which is not mandatory, since the application could use events instead, or waitUntilReady(), or might simply not care about waiting for initialization. This has been fixed so that no such promise is created until the first time the application calls waitForInitialization(); subsequent calls to the same method will return the same promise (since initialization can only happen once).
A bug in the event emitter made its behavior unpredictable if an event handler called on or off while handling an event. This has been fixed so that all event handlers that were defined at the time the event was fired will be called; any changes made will not take effect until the next event.
[1.4.1] - 2020-03-06
Fixed:
waitForInitialization()
and provided an error handler for the promise that was returned by that method. While that is correct behavior if the application did callwaitForInitialization()
(any promise that might be rejected should have an error handler attached), it is inappropriate if the application did not callwaitForInitialization()
at all-- which is not mandatory, since the application could use events instead, orwaitUntilReady()
, or might simply not care about waiting for initialization. This has been fixed so that no such promise is created until the first time the application callswaitForInitialization()
; subsequent calls to the same method will return the same promise (since initialization can only happen once).on
oroff
while handling an event. This has been fixed so that all event handlers that were defined at the time the event was fired will be called; any changes made will not take effect until the next event.