Skip to content

Commit e836f30

Browse files
authored
Merge pull request watson-developer-cloud#649 from ggarber/fix_content_type_unrecognized
Fix do not raise error when using content_type instead of "content-type" and format is unrecognized
2 parents 465a754 + f7d1de6 commit e836f30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/recognize-stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ class RecognizeStream extends Duplex {
388388
return;
389389
}
390390
if (!this.initialized) {
391-
if (!this.options['content-type']) {
391+
if (!this.options['content-type'] && !this.options.content_type) {
392392
const ct = RecognizeStream.getContentType(chunk);
393393
if (ct) {
394394
this.options['content-type'] = ct;

0 commit comments

Comments
 (0)