]> git.openstreetmap.org Git - rails.git/commitdiff
Don't try and use OAuth if we don't have a token
authorTom Hughes <tom@compton.nu>
Thu, 28 Mar 2013 14:29:38 +0000 (14:29 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Mar 2013 14:29:38 +0000 (14:29 +0000)
app/assets/javascripts/oauth.js

index 126d2d3eb470b1e44be07d4737cbbcc86215941c..40f685cc7f0f4b64f0ceadf76fbd063a5022e0f2 100644 (file)
@@ -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 = {