Skip to content

Commit ed6ee83

Browse files
committed
update
1 parent 58aef4f commit ed6ee83

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/configuration/apiCommunicationUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ function normalizeTopic(
3838

3939
if (Array.isArray(topic)) {
4040
const normalized = topic.map((t): Topic => ({ value: getTopicValue(t) }));
41+
// ✅ on garde tous les éléments mais on force le type [Topic]
4142
return normalized.length > 0 ? (normalized as [Topic]) : [{ value: '' }];
4243
}
4344

4445
return [{ value: getTopicValue(topic) }];
4546
}
46-

src/configuration/apiConfiguration.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ test('GetPublisherDetails should return the right publisher details given existi
9393
routingKey: 'input.1_0.HelloWorldMicroservice.HelloWorld.HelloWorldManager',
9494
};
9595
let publish = config.getPublisherDetails(-69981087, -829536631, 'XComponent.HelloWorld.UserObject.SayHello');
96+
console.log('debug GetPublisherDetails: ' + publish);
97+
console.log('debug GetPublisherDetails: ' + JSON.stringify(publish));
9698
expect(publish).toEqual(correctPublish);
9799
});
98100
});

src/configuration/apiConfiguration.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ export class DefaultApiConfiguration implements ApiConfiguration {
158158
`publisher not found - component code: ${componentCode} - statemachine code: ${stateMachineCode} - message type: ${messageType} `
159159
);
160160
}
161-
162161
return {
163162
eventCode: Number(publisher.attributes.eventCode),
164163
routingKey: publisher.topic[0].value,

0 commit comments

Comments
 (0)