Skip to content

Commit

Permalink
Merge pull request #141 from mechanik-daniel/v2.18.2
Browse files Browse the repository at this point in the history
fix: issue 100
  • Loading branch information
mechanik-daniel authored Dec 25, 2024
2 parents 04f300b + 383bb77 commit 295f6e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const operation = async (req: Request, res: Response) => {
const operationName: string = req.params?.operation;
if (operationName === '$transpile') {
const contentType: string | undefined = req.get('Content-Type');
if (contentType === 'text/plain' || contentType === 'application/vnd.outburn.fume') {
if (typeof contentType === 'string' && (contentType.startsWith('text/plain') || contentType.startsWith('application/vnd.outburn.fume'))) {
const inputMapping: string = req.body;
const tranpiled: string | undefined = await toJsonataString(inputMapping);
if (tranpiled) {
Expand Down

0 comments on commit 295f6e9

Please sign in to comment.