Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clone the opts object in the persistable module

  • Loading branch information...
commit 428ad3774e0cd1391e6b740800b3ba2a380bb279 1 parent 4500174
@robrobbins robrobbins authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 build/debug/sudo-x.js
  2. +2 −2 extras/extensions/persistable.js
View
4 build/debug/sudo-x.js
@@ -1574,7 +1574,7 @@ sudo.extensions.persistable = {
//
// `returns` {object} A normalized params object for the XHR call
_normalizeParams_: function _normalizeParams_(meth, opts, params) {
- opts || (opts = this.data.ajax);
+ opts || (opts = $.extend({}, this.data.ajax));
opts.url || (opts.url = this.url(opts.baseUrl));
opts.type || (opts.type = meth);
opts.dataType || (opts.dataType = 'json');
@@ -1617,7 +1617,7 @@ sudo.extensions.persistable = {
//
// `returns` {object} jqXhr
_sendData_: function _sendData_(meth, params) {
- opts = this.data.ajax;
+ opts = $.extend({}, this.data.ajax);
opts.contentType || (opts.contentType = 'application/json');
opts.data || (opts.data = this.data);
// non GET requests do not 'processData'
View
4 extras/extensions/persistable.js
@@ -48,7 +48,7 @@ sudo.extensions.persistable = {
//
// `returns` {object} A normalized params object for the XHR call
_normalizeParams_: function _normalizeParams_(meth, opts, params) {
- opts || (opts = this.data.ajax);
+ opts || (opts = $.extend({}, this.data.ajax));
opts.url || (opts.url = this.url(opts.baseUrl));
opts.type || (opts.type = meth);
opts.dataType || (opts.dataType = 'json');
@@ -91,7 +91,7 @@ sudo.extensions.persistable = {
//
// `returns` {object} jqXhr
_sendData_: function _sendData_(meth, params) {
- opts = this.data.ajax;
+ opts = $.extend({}, this.data.ajax);
opts.contentType || (opts.contentType = 'application/json');
opts.data || (opts.data = this.data);
// non GET requests do not 'processData'
Please sign in to comment.
Something went wrong with that request. Please try again.