#292 don't duplicate querystring parameters if dataType and method are both present
This commit is contained in:
parent
481d3feead
commit
8749379703
2 changed files with 34 additions and 1 deletions
|
|
@ -872,7 +872,7 @@ Mithril = m = new function app(window, undefined) {
|
|||
}
|
||||
function bindData(xhrOptions, data, serialize) {
|
||||
if (data && Object.keys(data).length > 0) {
|
||||
if (xhrOptions.method == "GET") {
|
||||
if (xhrOptions.method == "GET" && xhrOptions.dataType != "jsonp") {
|
||||
xhrOptions.url = xhrOptions.url + (xhrOptions.url.indexOf("?") < 0 ? "?" : "&") + buildQueryString(data)
|
||||
}
|
||||
else xhrOptions.data = serialize(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue