File tree Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -69,29 +69,30 @@ function User(name, factory) {
6969 } . bind ( this ) ) ;
7070
7171 // @if NODE_ENV='development'
72- c . log ( '[User] Preference model v. ' + this . preferences [ 'model_version' ] ) ;
72+ if ( this . preferences ) { c . log ( '[User] Preference model v. ' + this . preferences [ 'model_version' ] ) ; }
7373 // @endif
7474
75- if ( this . preferences [ 'model_version' ] !== app . getVersion ( ) ) {
76- // @if NODE_ENV='development'
77- c . log ( '[User] Using a different model. Latest is ' + app . getVersion ( ) ) ;
78- // @endif
79-
80- dialog . showMessageBox (
81- {
82- type : 'info' ,
83- message : 'Preference model outdated.' ,
84- detail : 'Reset the preferences to use new features.' ,
85- buttons : [ 'Reset' , 'Continue Anyway' ] ,
86- defaultId : 0
87- } ,
88- function ( buttonId ) {
75+ if ( this . preferences ) {
76+ if ( this . preferences [ 'model_version' ] !== app . getVersion ( ) ) {
77+ // @if NODE_ENV='development'
78+ c . log ( '[User] Using a different model. Latest is ' + app . getVersion ( ) ) ;
79+ // @endif
8980
90- if ( buttonId == 0 ) UserManager . reset ( 'Preferences' , 'oryoki-preferences.json' , 'factory.json' ) ;
81+ dialog . showMessageBox (
82+ {
83+ type : 'info' ,
84+ message : 'Preference model outdated.' ,
85+ detail : 'Reset the preferences to use new features.' ,
86+ buttons : [ 'Reset' , 'Continue Anyway' ] ,
87+ defaultId : 0
88+ } ,
89+ function ( buttonId ) {
9190
92- } . bind ( this )
93- ) ;
91+ if ( buttonId == 0 ) UserManager . reset ( 'Preferences' , 'oryoki-preferences.json' , 'factory.json' ) ;
9492
93+ } . bind ( this )
94+ ) ;
95+ }
9596 }
9697
9798 // Init conf file
You can’t perform that action at this time.
0 commit comments