File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed
Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,15 @@ export class Database {
120120 private createModule < M extends Model > ( model : M ) : void {
121121 const preserveState = ! ! this . store . state [ this . connection ] [ model . $entity ]
122122
123- this . store . registerModule ( [ this . connection , model . $entity ] , {
124- namespaced : true ,
125- state : this . createState ( ) ,
126- mutations : this . createMutations ( )
127- } , { preserveState } )
123+ this . store . registerModule (
124+ [ this . connection , model . $entity ] ,
125+ {
126+ namespaced : true ,
127+ state : this . createState ( ) ,
128+ mutations : this . createMutations ( )
129+ } ,
130+ { preserveState }
131+ )
128132 }
129133
130134 /**
@@ -147,6 +151,6 @@ export class Database {
147151 * Create schema from the given model.
148152 */
149153 private createSchema < M extends Model > ( model : M ) : Normalizr . Entity {
150- return this . schemas [ model . $entity ] = new Schema ( model ) . one ( )
154+ return ( this . schemas [ model . $entity ] = new Schema ( model ) . one ( ) )
151155 }
152156}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function createOptions(options: InstallOptions = {}): FilledInstallOptions {
3030/**
3131 * Mixin Vuex ORM feature to the store.
3232 */
33- function mixin ( store : Store < any > , options : FilledInstallOptions ) : void {
33+ function mixin ( store : Store < any > , options : FilledInstallOptions ) : void {
3434 createDatabase ( store , options )
3535
3636 installPlugins ( store )
Original file line number Diff line number Diff line change @@ -20,9 +20,7 @@ describe('unit/VuexORM', () => {
2020
2121 it ( 'can customize the namespace' , ( ) => {
2222 const store = new Vuex . Store ( {
23- plugins : [
24- VuexORM . install ( { namespace : 'database' } )
25- ]
23+ plugins : [ VuexORM . install ( { namespace : 'database' } ) ]
2624 } )
2725
2826 const expected = {
You can’t perform that action at this time.
0 commit comments