Skip to content

Commit 8192657

Browse files
committed
Scope the switch/case statement with braces
1 parent 085f0af commit 8192657

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/core/src/v3/utils/ioSerialization.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,12 @@ export async function createPacketAttributesAsJson(
351351
}
352352

353353
switch (dataType) {
354-
case "application/json":
354+
case "application/json": {
355355
return imposeAttributeLimits(
356356
flattenAttributes(data, undefined, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)
357357
);
358-
case "application/super+json":
358+
}
359+
case "application/super+json": {
359360
const { deserialize } = await loadSuperJSON();
360361

361362
const deserialized = deserialize(data) as any;
@@ -364,10 +365,13 @@ export async function createPacketAttributesAsJson(
364365
return imposeAttributeLimits(
365366
flattenAttributes(jsonify, undefined, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)
366367
);
367-
case "application/store":
368+
}
369+
case "application/store": {
368370
return data;
369-
default:
371+
}
372+
default: {
370373
return {};
374+
}
371375
}
372376
}
373377

0 commit comments

Comments
 (0)