Skip to content

Commit e72c212

Browse files
committed
fix(accept): check for existence of ext and profile before splitting
1 parent 9fd12a1 commit e72c212

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/accept.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ export const getAcceptableMediaTypes = (header: string): JsonApiMediaType[] => {
276276
}
277277

278278
accept.push({
279-
ext: ext.split(" "),
280-
profile: profile.split(" "),
279+
ext: ext ? ext.split(" ") : [],
280+
profile: profile ? profile.split(" ") : [],
281281
});
282282
return accept;
283283
}, []);

0 commit comments

Comments
 (0)