Skip to content

Commit b928176

Browse files
authored
chore: use @kikobeats/content-type (#627)
1 parent 23cf051 commit b928176

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/screenshot/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
],
3030
"dependencies": {
3131
"@browserless/goto": "^10.9.4",
32+
"@kikobeats/content-type": "~1.0.0",
3233
"@kikobeats/time-span": "~1.0.8",
3334
"debug-logfmt": "~1.4.0",
3435
"got": "~11.8.6",

packages/screenshot/src/pretty/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const PRETTY_CONTENT_TYPES = ['json', 'text', 'html']
1616
const { inject } = require('@browserless/goto')
1717

1818
const getContentType = headers => {
19-
const contentType = getExtension(headers['content-type']?.split(';')[0].trim().toLowerCase())
19+
const contentType = getExtension(require('@kikobeats/content-type')(headers['content-type']))
2020
return contentType === 'txt' ? 'text' : contentType
2121
}
2222

0 commit comments

Comments
 (0)