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

Commit

Permalink
make sure contentType is a string before running a regex match (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
robclancy authored and alexlafroscia committed Mar 27, 2017
1 parent 4e784a2 commit 60cb8de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/mixins/ajax-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const {
const JSONContentType = /^application\/(?:vnd\.api\+)?json/i;

function isJSONContentType(header) {
if (isNone(header)) {
if (!isString(header)) {
return false;
}
return !!header.match(JSONContentType);
Expand Down

0 comments on commit 60cb8de

Please sign in to comment.