Skip to content

Commit

Permalink
Fixed bug when ~/.ssh/config file doesn't exist. #3
Browse files Browse the repository at this point in the history
  • Loading branch information
sebas5384 committed Jul 18, 2016
1 parent 73af3b4 commit 94b0161
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 47 deletions.
18 changes: 14 additions & 4 deletions app/actions/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,22 @@ export function syncToLocal(items) {

export function syncFromLocal() {
const configFile = ConfigFile()
const localConfigItems = configFile.loadFromLocal()
try {
const localConfigItems = configFile.loadFromLocal()
return {
type: SYNC_ITEMS,
payload: localConfigItems
}
}
catch (e) {
configFile.sync('# Created by Hades.')

return {
type: SYNC_ITEMS,
payload: localConfigItems
return {
type: SYNC_ITEMS,
payload: []
}
}

}

export function save(data) {
Expand Down
41 changes: 0 additions & 41 deletions app/components/Counter.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CounterPage from './containers/CounterPage';


export default (
<Route path="/" component={App}>
<IndexRoute component={HomePage} />
<Route path="/counter" component={CounterPage} />
</Route>
);

0 comments on commit 94b0161

Please sign in to comment.