Skip to content

Commit b360e4b

Browse files
committed
be extra careful with typed attribute values
1 parent 49182eb commit b360e4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ export class Scope {
328328
*/
329329
public setAttributes(newAttributes: Record<string, AttributeValueType | TypedAttributeValue>): this {
330330
Object.entries(newAttributes).forEach(([key, value]) => {
331-
if (typeof value === 'object' && !Array.isArray(value)) {
331+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
332332
this._attributes[key] = value;
333333
} else {
334334
this._attributes[key] = attributeValueToTypedAttributeValue(value);

0 commit comments

Comments
 (0)