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 {
120
120
private createModule < M extends Model > ( model : M ) : void {
121
121
const preserveState = ! ! this . store . state [ this . connection ] [ model . $entity ]
122
122
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
+ )
128
132
}
129
133
130
134
/**
@@ -147,6 +151,6 @@ export class Database {
147
151
* Create schema from the given model.
148
152
*/
149
153
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 ( ) )
151
155
}
152
156
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function createOptions(options: InstallOptions = {}): FilledInstallOptions {
30
30
/**
31
31
* Mixin Vuex ORM feature to the store.
32
32
*/
33
- function mixin ( store : Store < any > , options : FilledInstallOptions ) : void {
33
+ function mixin ( store : Store < any > , options : FilledInstallOptions ) : void {
34
34
createDatabase ( store , options )
35
35
36
36
installPlugins ( store )
Original file line number Diff line number Diff line change @@ -20,9 +20,7 @@ describe('unit/VuexORM', () => {
20
20
21
21
it ( 'can customize the namespace' , ( ) => {
22
22
const store = new Vuex . Store ( {
23
- plugins : [
24
- VuexORM . install ( { namespace : 'database' } )
25
- ]
23
+ plugins : [ VuexORM . install ( { namespace : 'database' } ) ]
26
24
} )
27
25
28
26
const expected = {
You can’t perform that action at this time.
0 commit comments