From 77877707581af93e7ada33ccc79f9a0177ed92a0 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 27 Aug 2013 16:02:36 +1000 Subject: [PATCH] leftover console.log jshint is upset --- app/assets/javascripts/discourse.js | 2 -- app/assets/javascripts/discourse/mixins/ajax.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse.js b/app/assets/javascripts/discourse.js index 254a8b4d07b..55d09cc9935 100644 --- a/app/assets/javascripts/discourse.js +++ b/app/assets/javascripts/discourse.js @@ -134,8 +134,6 @@ Discourse = Ember.Application.createWithMixins(Discourse.Ajax, { // Add a CSRF token to all AJAX requests Discourse.csrfToken = $('meta[name=csrf-token]').attr('content'); - console.log(Discourse.csrfToken); - $.ajaxPrefilter(function(options, originalOptions, xhr) { if (!options.crossDomain) { xhr.setRequestHeader('X-CSRF-Token', Discourse.csrfToken); diff --git a/app/assets/javascripts/discourse/mixins/ajax.js b/app/assets/javascripts/discourse/mixins/ajax.js index e28f54b8f61..80db39d5137 100644 --- a/app/assets/javascripts/discourse/mixins/ajax.js +++ b/app/assets/javascripts/discourse/mixins/ajax.js @@ -58,7 +58,7 @@ Discourse.Ajax = Em.Mixin.create({ // note: for bad CSRF we don't loop an extra request right away. // this allows us to eliminate the possibility of having a loop. - if (xhr.status === 403 && xhr.responseText == "['BAD CSRF']") { + if (xhr.status === 403 && xhr.responseText === "['BAD CSRF']") { Discourse.csrfToken = null; }