FIX: Chrome has a bug where if you request the same URL with a different

MIME type, then leave and hit the back button, you'll get the last MIME
type requested instead of HTML. This fixes it.
This commit is contained in:
Robin Ward 2014-02-10 12:43:17 -05:00
parent b61b33c0fa
commit 45afed8720
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ Discourse.AdminDashboard.reopenClass({
@return {jqXHR} a jQuery Promise object
**/
find: function() {
return Discourse.ajax("/admin/dashboard").then(function(json) {
return Discourse.ajax("/admin/dashboard.json").then(function(json) {
var model = Discourse.AdminDashboard.create(json);
model.set('loaded', true);
return model;
@ -34,7 +34,7 @@ Discourse.AdminDashboard.reopenClass({
@return {jqXHR} a jQuery Promise object
**/
fetchProblems: function() {
return Discourse.ajax("/admin/dashboard/problems", {
return Discourse.ajax("/admin/dashboard/problems.json", {
type: 'GET',
dataType: 'json'
}).then(function(json) {

View File

@ -388,7 +388,7 @@ Discourse.AdminUser.reopenClass({
},
find: function(username) {
return Discourse.ajax("/admin/users/" + username).then(function (result) {
return Discourse.ajax("/admin/users/" + username + ".json").then(function (result) {
result.loadedDetails = true;
return Discourse.AdminUser.create(result);
});