Build: _this is not a function
-
Having a tough time tracking this one down but maybe y’all have seen something like it. The code looks fine and works great on dev so not sure what I’m missing… This is being built with 0.15.3, running with quasar dev it works perfect.
Error I’m getting is: _this.userTheme is not a function
Here’s what the function looks like:
export const userTheme = (state) => { var pi = _.findIndex(state.user.properties, function (o) { return o.type === 'theme' }) if (pi > -1) { return _.toInteger(state.user.properties[pi].value) } else { let ct = this.customerTheme(state) if (ct === -1) { return 0 } else { return ct } } } export const whichThemeNamed = (state) => { let which = this.userTheme(state) <-------Errors out here which = (which === 0) ? 'lighttheme' : 'darktheme' t.$log('Which Theme Named', { theme: which }) return which }