walmartlabs/thorax — pull request #378 by DatenMetzgerX (2014-10-31 07:44:09+00:00)
Title: Success handler of fetch is not called when response is synchronous (and fetchQueue is empty)

In the fetchQueue method a new queue is created when no one exists. Additionally the success and error callbacks are overridden to point to flushQueue. When super ($super.call) is called, the fetch queue is still empty. When the super.call now resolves the success handler synchronous (no defer or anything), then at the moment where flushQueue is called, the queue is still empty, and the success or error handler are not called (because the queue is empty)

A simple solution could be, that super will be invoked using _.defer. Otherwise the registration in the flushQueue must take place before invoking super...