Skip to content
Snippets Groups Projects
Commit 55f107dc authored by robinwilliam.hundt's avatar robinwilliam.hundt
Browse files

Fixed bug when reloading page

parent 2015309f
No related branches found
No related tags found
1 merge request!114Resolve "Frontend Refactor"
import vueInstance from '@/main.ts'
export function nameSpacer (namespace: string) { export function nameSpacer (namespace: string) {
return function (commitType: string) { return function (commitType: string) {
...@@ -42,10 +41,10 @@ export function createComputedGetterSetter ( ...@@ -42,10 +41,10 @@ export function createComputedGetterSetter (
{path: string, mutation: string, namespace:string}): GetSetPair { {path: string, mutation: string, namespace:string}): GetSetPair {
return { return {
get (): any { get (): any {
return getObjectValueByPath(vueInstance.$store.state, path) return getObjectValueByPath(this.$store.state, path)
}, },
set (val: object): void { set (val: object): void {
vueInstance.$store.commit(`${namespace ? namespace + '/' : ''}${mutation}`, val) this.$store.commit(`${namespace ? namespace + '/' : ''}${mutation}`, val)
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment