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:
David Battersby 2024-01-18 16:28:23 +08:00 committed by GitHub
parent fb087b7ff6
commit 6fa836d781
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,6 @@ import { inject as service } from "@ember/service";
import { modifier } from "ember-modifier";
import DButton from "discourse/components/d-button";
import concatClass from "discourse/helpers/concat-class";
import { popupAjaxError } from "discourse/lib/ajax-error";
import i18n from "discourse-common/helpers/i18n";
import eq from "truth-helpers/helpers/eq";
@ -23,7 +22,8 @@ export default class ChatFooter extends Component {
this.threadsEnabled = result.thread_count > 0;
})
.catch((error) => {
popupAjaxError(error);
// eslint-disable-next-line no-console
console.error(error);
});
return () => {