Skip to content
This repository has been archived by the owner on May 30, 2018. It is now read-only.

Commit

Permalink
fix(notifications): fix array in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Salas Bastidas committed Jan 23, 2017
1 parent 2f49dcb commit fee38dc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### Description

### Expected behaviour
### Expected behavior

### Actual behaviour
### Actual behavior

### Environment Details

Expand Down
16 changes: 11 additions & 5 deletions app/scripts/services/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,18 @@ angular.module('FlyveMDM')
break;
default:
var errorMsg = rejection.data[1];
var docMsg = errorMsg.toString().indexOf(';');
if (docMsg !== -1) {
errorMsg = errorMsg.split(';');
Notifications.error(errorMsg[0]);
if (Array.isArray(errorMsg)) {
errorMsg.forEach(function (errorById) {
Notifications.error(errorById.message);
});
} else {
Notifications.error(errorMsg);
var docMsg = errorMsg.toString().indexOf(';');
if (docMsg !== -1) {
errorMsg = errorMsg.split(';');
Notifications.error(errorMsg[0]);
} else {
Notifications.error(errorMsg);
}
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
},
"private": true,
"dependencies": {
"angular": "^1.6.0",
"angular-animate": "^1.6.0",
"angular-cookies": "^1.6.0",
"angular-resource": "^1.6.0",
"angular-route": "^1.6.0",
"angular-sanitize": "^1.6.0",
"angular": "^1.6.1",
"angular-animate": "^1.6.1",
"angular-cookies": "^1.6.1",
"angular-resource": "^1.6.1",
"angular-route": "^1.6.1",
"angular-sanitize": "^1.6.1",
"angular-material": "^1.1.1",
"angular-ui-router": "^0.3.2",
"angular-ui-router": "^0.4.2",
"angular-smart-table": "^2.1.8",
"components-font-awesome": "^4.7.0",
"ng-file-upload": "^12.2.13",
Expand All @@ -72,9 +72,9 @@
"dexie": "^1.5.1"
},
"devDependencies": {
"angular-mocks": "^1.6.0"
"angular-mocks": "^1.6.1"
},
"resolutions": {
"angular": "1.6.0"
}
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^1.0.2",
"grunt-contrib-htmlmin": "^2.0.0",
"grunt-contrib-htmlmin": "^2.1.0",
"grunt-contrib-imagemin": "^1.0.1",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-uglify": "^2.0.0",
Expand All @@ -33,12 +33,12 @@
"jasmine-core": "^2.5.2",
"jit-grunt": "^0.10.0",
"jshint-stylish": "^2.2.1",
"karma": "^1.3.0",
"karma": "^1.4.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.0",
"karma-phantomjs-launcher": "^1.0.2",
"markdownlint": "^0.3.1",
"newman": "^3.3.0",
"newman": "^3.4.2",
"phantomjs-prebuilt": "^2.1.14",
"sass-lint": "^1.10.2",
"serve-static": "^1.11.1",
Expand Down Expand Up @@ -98,4 +98,4 @@
},
"private": true,
"dependencies": {}
}
}

0 comments on commit fee38dc

Please sign in to comment.