Make sure default value for range is set

This commit is contained in:
2019-03-02 22:35:12 +01:00
parent 4368cd8af5
commit 4cbc7ec13a
+2 -2
View File
@@ -87,7 +87,7 @@
snackbar: false, snackbar: false,
snackColor: "success", snackColor: "success",
snackText: "", snackText: "",
range: undefined, range: "ONE_WEEK",
ranges: [ ranges: [
{name: "1 vecka", value: "ONE_WEEK"}, {name: "1 vecka", value: "ONE_WEEK"},
{name: "2 veckor", value: "TWO_WEEKS"}, {name: "2 veckor", value: "TWO_WEEKS"},
@@ -120,7 +120,7 @@
mounted() { mounted() {
this.$store.commit('setTitle', 'Evenemang'); this.$store.commit('setTitle', 'Evenemang');
const {range} = this.$route.query; const {range} = this.$route.query;
this.range = range; this.range = range || "ONE_WEEK";
this.fetchUser(); this.fetchUser();
this.fetchEvents(); this.fetchEvents();
}, },