Skip to content

Commit

Permalink
Merge pull request #624 from xodio/fix-default-arduino-board
Browse files Browse the repository at this point in the history
Fix default arduino board
  • Loading branch information
brusherru authored Jun 28, 2017
2 parents b67afd1 + 24f5ba3 commit 808d93c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/xod-client-electron/src/app/arduinoActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ export const getListOfBoards = R.compose(
/**
* Returns a target Board.
* It tries to take a value from Settings, if it doesn't exist
* it will fallback to the first Board from listOfBoards.
* it will just return Null
*/
// :: () -> Board
// :: () -> Nullable Board
export const loadTargetBoard = () => R.compose(
R.when(
R.either(R.isNil, R.isEmpty),
R.compose(
R.head,
getListOfBoards
)
R.always(null)
),
settings.getArduinoTarget,
settings.load
Expand Down

0 comments on commit 808d93c

Please sign in to comment.