Skip to content

Commit

Permalink
Update packages/td-tools/src/thing-model-helpers.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Romann <[email protected]>
  • Loading branch information
danielpeintner and JKRhb authored Sep 12, 2023
1 parent c574913 commit ea1dc82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/td-tools/src/thing-model-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class ThingModelHelpers {
case "http": {
return new Promise((resolve, reject) => {
http.get(uri, (res) => {
if (res.statusCode === undefined || res.statusCode !== 200) {
if (res?.statusCode !== 200) {
reject(new Error(`http status code not 200 but ${res.statusCode} for ${uri}`));
}

Expand Down

0 comments on commit ea1dc82

Please sign in to comment.