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 58198a2 commit d1f6ee6
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 @@ -508,7 +508,7 @@ export class ThingModelHelpers {
extendedModel.properties = {};
}
for (const key in properties) {
if (dest.properties && dest.properties[key] !== undefined) {
if (dest?.properties[key] !== undefined) {

Check failure on line 511 in packages/td-tools/src/thing-model-helpers.ts

View workflow job for this annotation

GitHub Actions / setup-and-test (ubuntu-latest, 16.x)

Object is possibly 'undefined'.

Check failure on line 511 in packages/td-tools/src/thing-model-helpers.ts

View workflow job for this annotation

GitHub Actions / setup-and-test (ubuntu-latest, 18.x)

Object is possibly 'undefined'.
extendedModel.properties[key] = { ...properties[key], ...dest.properties[key] };
} else {
extendedModel.properties[key] = properties[key];
Expand Down

0 comments on commit d1f6ee6

Please sign in to comment.