From: Tom Hughes Date: Thu, 28 Mar 2013 14:29:38 +0000 (+0000) Subject: Don't try and use OAuth if we don't have a token X-Git-Tag: live~6077^2~10 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/84f7d322d01639a9a4617ff2f3f635e2e1e2cfc6?ds=inline Don't try and use OAuth if we don't have a token --- diff --git a/app/assets/javascripts/oauth.js b/app/assets/javascripts/oauth.js index 126d2d3eb..40f685cc7 100644 --- a/app/assets/javascripts/oauth.js +++ b/app/assets/javascripts/oauth.js @@ -2,7 +2,7 @@ //= require ohauth $.ajaxPrefilter(function(options, jqxhr) { - if (options.oauth) { + if (options.oauth && OSM.oauth_token) { var ohauth = window.ohauth; var url = options.url.replace(/\?$/, ""); var params = {