Skip to content

Commit

Permalink
Minor fix in resource
Browse files Browse the repository at this point in the history
When a request fails, we don't want to add another error by calling
match on a non existant header
  • Loading branch information
LFDM committed May 29, 2014
1 parent 7885f57 commit 2829c36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/js/arethusa.core/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ angular.module('arethusa.core').factory('Resource', [
}

function isJson(header) {
return header.match('json');
if (header) return header.match('json');
}

function collectedParams(a, b) {
Expand Down

0 comments on commit 2829c36

Please sign in to comment.