Fix async switches #110

Merged
BehindTheMath merged 3 commits from fix/async-switches into master 2018-01-22 10:55:30 -05:00

3 Commits

Author SHA1 Message Date
Robin North
1957526273 Clone options into state, minor code cleanup 2018-01-22 14:53:19 +00:00
Behind The Math
ff6f9b36ca Bug fixes and code cleanup
With a lot of help from @robinnorth
2018-01-21 14:16:57 -05:00
Behind The Math
cb0a7cd850 Move all code that executes after the switches to a new function
If any switches are async, the subsequent code will execute before
the switches are finished. This commit moves all that code to a new
function, and debounces the calls to onSwitch() so it only executes
once, after all the switches finish.

Fizes #72.
2018-01-20 22:06:03 -05:00