@@ -153,23 +153,26 @@ export const handleCommandsEpic = (action$, store) =>
153153 } )
154154
155155export const postConnectCmdEpic = ( some$ , store ) =>
156- some$
157- . zip ( some$ . ofType ( CONNECTION_SUCCESS ) , some$ . ofType ( UPDATE_SETTINGS ) )
158- . do ( ( ) => {
159- const serverSettings = getAvailableSettings ( store . getState ( ) )
160- if ( serverSettings && serverSettings [ 'browser.post_connect_cmd' ] ) {
161- const cmdchar = getCmdChar ( store . getState ( ) )
162- const cmds = extractPostConnectCommandsFromServerConfig (
163- serverSettings [ 'browser.post_connect_cmd' ]
164- )
165- if ( cmds !== undefined ) {
166- cmds . forEach ( cmd => {
167- store . dispatch ( executeSystemCommand ( `${ cmdchar } ${ cmd } ` ) )
168- } )
156+ some$ . ofType ( CONNECTION_SUCCESS ) . mergeMap ( ( ) =>
157+ some$
158+ . ofType ( UPDATE_SETTINGS )
159+ . map ( ( ) => {
160+ const serverSettings = getAvailableSettings ( store . getState ( ) )
161+ if ( serverSettings && serverSettings [ 'browser.post_connect_cmd' ] ) {
162+ const cmdchar = getCmdChar ( store . getState ( ) )
163+ const cmds = extractPostConnectCommandsFromServerConfig (
164+ serverSettings [ 'browser.post_connect_cmd' ]
165+ )
166+ if ( cmds !== undefined ) {
167+ cmds . forEach ( cmd => {
168+ store . dispatch ( executeSystemCommand ( `${ cmdchar } ${ cmd } ` ) )
169+ } )
170+ }
169171 }
170- }
171- } )
172- . mapTo ( { type : 'NOOP' } )
172+ return { type : 'NOOP' }
173+ } )
174+ . take ( 1 )
175+ )
173176
174177export const fetchGuideFromWhitelistEpic = ( some$ , store ) =>
175178 some$ . ofType ( FETCH_GUIDE_FROM_WHITELIST ) . mergeMap ( action => {
0 commit comments