File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ function DesktopRoot({ store }) {
113113 } ) ;
114114 }
115115
116- if ( process . env . NODE_ENV = == 'development' && currentAccount ) {
116+ if ( process . env . NODE_ENV ! == 'development' && currentAccount ) {
117117 dispatch ( received ( features . mcAuthentication ) ) ;
118118 dispatch ( push ( '/home' ) ) ;
119119 } else if ( currentAccount ) {
@@ -123,13 +123,13 @@ function DesktopRoot({ store }) {
123123 dispatch ( ( ) => {
124124 switch ( currentAccount . accountType ) {
125125 case ACCOUNT_MICROSOFT :
126- loginWithOAuthAccessToken ( ) ;
126+ dispatch ( loginWithOAuthAccessToken ( ) ) ;
127127 break ;
128128 case ACCOUNT_LOCAL :
129- loginLocalWithoutAccessToken ( ) ;
129+ dispatch ( loginLocalWithoutAccessToken ( ) ) ;
130130 break ;
131131 default :
132- loginWithAccessToken ( ) ;
132+ dispatch ( loginWithAccessToken ( ) ) ;
133133 break ;
134134 }
135135 } )
Original file line number Diff line number Diff line change @@ -71,13 +71,13 @@ const ProfileSettings = () => {
7171 dispatch ( ( ) => {
7272 switch ( account . accountType ) {
7373 case ACCOUNT_MICROSOFT :
74- loginWithOAuthAccessToken ( false ) ;
74+ dispatch ( loginWithOAuthAccessToken ( false ) ) ;
7575 break ;
7676 case ACCOUNT_LOCAL :
77- loginLocalWithoutAccessToken ( false ) ;
77+ dispatch ( loginLocalWithoutAccessToken ( false ) ) ;
7878 break ;
7979 default :
80- loginWithAccessToken ( false ) ;
80+ dispatch ( loginWithAccessToken ( false ) ) ;
8181 break ;
8282 }
8383 } )
Original file line number Diff line number Diff line change @@ -271,13 +271,13 @@ export function switchToFirstValidAccount(id) {
271271 await dispatch ( ( ) => {
272272 switch ( accounts [ i ] . accountType ) {
273273 case ACCOUNT_MICROSOFT :
274- loginWithOAuthAccessToken ( ) ;
274+ dispatch ( loginWithOAuthAccessToken ( ) ) ;
275275 break ;
276276 case ACCOUNT_LOCAL :
277- loginLocalWithoutAccessToken ( ) ;
277+ dispatch ( loginLocalWithoutAccessToken ( ) ) ;
278278 break ;
279279 default :
280- loginWithAccessToken ( ) ;
280+ dispatch ( loginWithAccessToken ( ) ) ;
281281 break ;
282282 }
283283 } ) ;
@@ -752,6 +752,7 @@ export function loginWithAccessToken(redirect = true) {
752752
753753export function loginLocalWithoutAccessToken ( ) {
754754 return async ( dispatch , getState ) => {
755+ console . log ( 'lol' ) ;
755756 const state = getState ( ) ;
756757 const currentAccount = _getCurrentAccount ( state ) ;
757758 const { selectedProfile } = currentAccount ;
You can’t perform that action at this time.
0 commit comments