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 }}
Repository navigation
$.fixture templated values not being included in callback data #136
If you set up a dynamic fixture with a templated URL, the originalOptions param of the callback will not be updated with the templated URL values if the data prop was not set in options of the AJAX call.
The solution I devised involves checking to make sure the data property of originalOptions exists and if it doesn't, setting it to an empty object before calling jQuery.extend.
@@ -53,6 +53,10 @@
settings.dataTypes.splice(0,0,"fixture");
if(data){
+ if(! ('data' in originalOptions)) {+ originalOptions.data = {};+ }+
$.extend(originalOptions.data, data)
}
// add to settings data from fixture ...
Activity