mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
fix filter reset on pinning items - fixes #9500
This commit is contained in:
@@ -521,9 +521,12 @@ export default {
|
||||
categories () {
|
||||
if (this.shop.categories) {
|
||||
this.shop.categories.forEach(category => {
|
||||
this.$set(this.viewOptions, category.identifier, {
|
||||
selected: false,
|
||||
});
|
||||
// do not reset the viewOptions if already set once
|
||||
if (typeof this.viewOptions[category.identifier] === 'undefined') {
|
||||
this.$set(this.viewOptions, category.identifier, {
|
||||
selected: false,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return this.shop.categories;
|
||||
|
||||
@@ -379,9 +379,12 @@ export default {
|
||||
normalGroups.push(setCategory);
|
||||
|
||||
normalGroups.forEach(category => {
|
||||
this.$set(this.viewOptions, category.identifier, {
|
||||
selected: false,
|
||||
});
|
||||
// do not reset the viewOptions if already set once
|
||||
if (typeof this.viewOptions[category.identifier] === 'undefined') {
|
||||
this.$set(this.viewOptions, category.identifier, {
|
||||
selected: false,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return normalGroups;
|
||||
|
||||
Reference in New Issue
Block a user