Passing an array in a single argument using jQuery deffered.resolveWith()
===

I have a [jQuery deferred][1], which I an resolving like so:

    deferredAction.resolve(returnArray);

and this is calling a callback like:

    function someCallback(myArray) {
    ...
    }

This works fine, the callback function receives the array.  However I need to set the context of the callback function, so I used [deferred.resolveWith][2] like so:

    deferredAction.resolveWith(someContext, returnArray);

The context is now being set correctly. However, it now seems as if the returnArray is being split up.  **My callback only receives the first item of the array.**

**Why is this happening, and how can I work around it?**


  [1]: http://api.jquery.com/category/deferred-object/
  [2]: http://api.jquery.com/deferred.resolveWith/