1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 11:50:37 +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:
Dominik Schmidt
2015-01-13 14:18:24 +01:00
parent 178f13acba
commit 61ad535909

View File

@@ -476,9 +476,8 @@ Tomahawk.ajax = function(url, settings) {
if (typeof url === "object") {
settings = url;
} else {
settings = {
url: url
};
settings = settings || {};
settings.url = url;
}
settings.method = settings.type;
@@ -539,9 +538,8 @@ Tomahawk.post = function(url, settings) {
if (typeof url === "object") {
settings = url;
} else {
settings = {
url: url
};
settings = settings || {};
settings: url;
}
settings.method = 'POST';