Skip to content

Commit df20650

Browse files
refactor: remove duplicated contentType initialization
1 parent 01e0b84 commit df20650

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

packages/core/src/consumed-thing.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,6 @@ export default class ConsumedThing extends TD.Thing implements IConsumedThing {
745745
formWithoutURITemplates,
746746
// next
747747
(content) => {
748-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tsc get confused when nullables are to listeners lambdas
749-
if (!content.type) content.type = form!.contentType ?? "application/json";
750748
try {
751749
listener(this.handleInteractionOutput(content, form, tp));
752750
} catch (e) {
@@ -803,8 +801,6 @@ export default class ConsumedThing extends TD.Thing implements IConsumedThing {
803801
await client.subscribeResource(
804802
formWithoutURITemplates,
805803
(content) => {
806-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tsc get confused when nullables are to listeners lambdas
807-
if (!content.type) content.type = form!.contentType ?? "application/json";
808804
try {
809805
listener(this.handleInteractionOutput(content, form, te.data));
810806
} catch (e) {

0 commit comments

Comments
 (0)