Skip to content

Commit

Permalink
Merge pull request #10 from catbee/error-handling
Browse files Browse the repository at this point in the history
Better error handling
  • Loading branch information
markuplab authored Jul 23, 2016
2 parents 358d0ea + e62f865 commit 44c404f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appstate",
"version": "2.1.1",
"version": "2.1.2",
"description": "Barebone state manager implementation based on Cerebral signals conception",
"main": "./src/appstate.js",
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/appstate.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,9 @@ function transformSyncBranch (action, parentAction, path, actions, isSync) {
* @param {Array} actions
*/
function analyze (actions) {

if (!Array.isArray(actions)) {
throw new Error('State: Signal actions should be array');
}

actions.forEach((action, index) => {
if (typeof action === 'undefined' || typeof action === 'string') {
Expand Down

0 comments on commit 44c404f

Please sign in to comment.