You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
fix (onReady): Clear ready timeout when instance closed, and other small fixes (optimizely#25)
Summary:
Previously, if close was called with pending ready timeouts, those timeouts would remain active. With this change, we clear all pending ready timeouts when close is called.
To guard against Promises returned from onReady remaining permanently pending, in close, we resolve any ready promises associated with pending timeouts with unsuccessful results.
There are two other small changes in this PR:
- Improve documentation comments for Optimzely onReady and ProjectConfigManager onReady
- Return false from setForcedVariation when no configObj available (was previously returning null)
Test plan:
Updated unit tests, existing unit tests should continue passing
it('fulfills the promise with the value from the project config manager ready promise after the project config manager ready promise is fulfilled',function(){
it('fulfills the promise with an unsuccessful result after the timeout has expired when the project config manager onReady promise still has not resolved',function(){
0 commit comments