mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: prevent popup when thread count request fails (#25308)
On the rare occasions that an ajax request for thread count fails, we should fail silently without alerting the user.
This commit is contained in:
parent
fb087b7ff6
commit
6fa836d781
@ -4,7 +4,6 @@ import { inject as service } from "@ember/service";
|
|||||||
import { modifier } from "ember-modifier";
|
import { modifier } from "ember-modifier";
|
||||||
import DButton from "discourse/components/d-button";
|
import DButton from "discourse/components/d-button";
|
||||||
import concatClass from "discourse/helpers/concat-class";
|
import concatClass from "discourse/helpers/concat-class";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
|
||||||
import i18n from "discourse-common/helpers/i18n";
|
import i18n from "discourse-common/helpers/i18n";
|
||||||
import eq from "truth-helpers/helpers/eq";
|
import eq from "truth-helpers/helpers/eq";
|
||||||
|
|
||||||
@ -23,7 +22,8 @@ export default class ChatFooter extends Component {
|
|||||||
this.threadsEnabled = result.thread_count > 0;
|
this.threadsEnabled = result.thread_count > 0;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
popupAjaxError(error);
|
// eslint-disable-next-line no-console
|
||||||
|
console.error(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user