mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 13:16:28 +08:00
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:
parent
b61b33c0fa
commit
45afed8720
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user