mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 16:10:48 +08:00
FIX: Default to the first list if the preferred one is empty (#22915)
This commit is contained in:
parent
da6ddb638f
commit
514f5d25e6
|
@ -41,8 +41,11 @@ export default class MoreTopics extends Component {
|
|||
}
|
||||
|
||||
let preference = this.moreTopicsPreferenceTracking.preference;
|
||||
// Scenario where we have a preference, but there
|
||||
// are no more elements in it.
|
||||
const listPresent = pills.find((pill) => pill.id === preference);
|
||||
|
||||
if (!preference) {
|
||||
if (!listPresent) {
|
||||
const rememberPref = this.site.mobileView && !this.singleList;
|
||||
|
||||
this.moreTopicsPreferenceTracking.updatePreference(
|
||||
|
|
Loading…
Reference in New Issue
Block a user