Skip to content

Commit

Permalink
Update growlFactory.js
Browse files Browse the repository at this point in the history
On responseError data is null, and an error is raised.
  • Loading branch information
AlexTM84 committed Apr 30, 2015
1 parent ee0fcc0 commit 32fc8a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/growlFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ angular.module("angular-growl").provider("growl", function () {
*/
this.serverMessagesInterceptor = ['$q', 'growl', function ($q, growl) {
function checkResponse (response) {
if (response !== undefined && response.data[_messagesKey] && response.data[_messagesKey].length > 0) {
if (response !== undefined && response.data && response.data[_messagesKey] && response.data[_messagesKey].length > 0) {
growl.addServerMessages(response.data[_messagesKey]);
}
}
Expand Down

0 comments on commit 32fc8a0

Please sign in to comment.