Skip to content

Commit f58e816

Browse files
committed
be extra careful with typed attribute values
1 parent b761c5a commit f58e816

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
@@ -326,7 +326,7 @@ export class Scope {
326326
*/
327327
public setAttributes(newAttributes: Record<string, AttributeValueType | TypedAttributeValue>): this {
328328
Object.entries(newAttributes).forEach(([key, value]) => {
329-
if (typeof value === 'object' && !Array.isArray(value)) {
329+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
330330
this._attributes[key] = value;
331331
} else {
332332
this._attributes[key] = attributeValueToTypedAttributeValue(value);

0 commit comments

Comments
 (0)