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 126d2d3..40f685c 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 = {