Skip to content

Commit a24844e

Browse files
committed
fix(shadow): construct map properly
In case of multiple connections, only the last one was included
1 parent 0ae38dc commit a24844e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lambda/fetchDeviceShadow.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const h = async (): Promise<void> => {
8484
metrics.addMetric('connections', MetricUnits.Count, connections.length)
8585
const deviceConnectionsMap = connections.reduce(
8686
(map, connection) => ({
87+
...map,
8788
[connection.deviceId]: [
8889
...(map[connection.deviceId] ?? []),
8990
connection,

0 commit comments

Comments
 (0)