mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
Miscellaneous lint fixes: move watch & mounted properties; apply automatic fixes (#12791)
* commit lint's automatic fixes * move watch and mounted properties as advised in lint warnings
This commit is contained in:
@@ -384,16 +384,6 @@ export default {
|
||||
memberResults: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'challenge.name': {
|
||||
handler (newVal) {
|
||||
this.$store.dispatch('common:setTitle', {
|
||||
section: this.$t('challenge'),
|
||||
subSection: newVal.name,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState({ user: 'user.data' }),
|
||||
isMember () {
|
||||
@@ -410,6 +400,16 @@ export default {
|
||||
return !this.isMember;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'challenge.name': {
|
||||
handler (newVal) {
|
||||
this.$store.dispatch('common:setTitle', {
|
||||
section: this.$t('challenge'),
|
||||
subSection: newVal.name,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
if (!this.searchId) this.searchId = this.challengeId;
|
||||
if (!this.challenge._id) this.loadChallenge();
|
||||
|
||||
Reference in New Issue
Block a user