I have a computed property in VueJS like this:
  computed: {
    groupedTemplates() {
      const ret = this.templates.reduce((acc, value) => {
        value.group = value.group || "Ungrouped";
        if (!acc[value.group]) {
          acc[value.group] = [];
        }
        acc[value.group].push(value);
        return acc;
      }, []);
      console.log(ret);   // <---- This works!!
      return ret;
    },
    ...mapState(["currentPatient", "currentSite", "phrases", "templates"]),
  },
When I view the console, I can see the correct response which is
app.js:4061 [Ungrouped: Array(6), Note: Array(2), Order Set: Array(3)]
However, when I use groupedTemplates in code, it evaluates to []
when I change the return line to
return 34;
It returns 34 as expected. What gives?
 
    