Skip to content

Commit cecac1b

Browse files
committed
fix(core): clone tags for immutability
1 parent 5dec9c0 commit cecac1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/unhead/src/createHead.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function createHeadCore<T = ResolvableHead>(resolvedOptions: CreateHeadOp
106106
}
107107
let hasFlatMeta = false
108108
ctx.entries
109-
.flatMap(e => e._tags || [])
109+
.flatMap(e => (e._tags || []).map(t => ({ ...t, props: { ...t.props } })))
110110
.sort(sortTags)
111111
.reduce((acc, next) => {
112112
const k = String(next._d || next._p)

0 commit comments

Comments
 (0)