mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
[tomahawk.js] Don't override all settings passed to Tomahawk.ajax/post if url is passed as first parameter
Thanks to Will Stott (@willstott101) for catching the actual bug and finding a typo in the first version of this commit.
This commit is contained in:
@@ -476,9 +476,8 @@ Tomahawk.ajax = function(url, settings) {
|
|||||||
if (typeof url === "object") {
|
if (typeof url === "object") {
|
||||||
settings = url;
|
settings = url;
|
||||||
} else {
|
} else {
|
||||||
settings = {
|
settings = settings || {};
|
||||||
url: url
|
settings.url = url;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.method = settings.type;
|
settings.method = settings.type;
|
||||||
@@ -539,9 +538,8 @@ Tomahawk.post = function(url, settings) {
|
|||||||
if (typeof url === "object") {
|
if (typeof url === "object") {
|
||||||
settings = url;
|
settings = url;
|
||||||
} else {
|
} else {
|
||||||
settings = {
|
settings = settings || {};
|
||||||
url: url
|
settings: url;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.method = 'POST';
|
settings.method = 'POST';
|
||||||
|
Reference in New Issue
Block a user