Closed mlhaufe closed 1 year ago
const fooData = data({ Foo: {}, ... }) const barData = data({ [extend]: fooData, Bar: {}, ... }) barData[baseVariant] === fooData
This should be equal to barData. The issue and challenge is here:
barData
// data.mjs factory = dataDef[extend] ? Object.create(dataDef[extend]) : Object.assign(Object.create(protoFactory), { [baseVariant]: protoVariant })
Ideally, the fix would just be:
factory = Object.assign(Object.create(dataDef[extend] ?? protoFactory), { [baseVariant]: protoVariant })
But dataDef[extend] is frozen.
dataDef[extend]
Fixed as part of #63
This should be equal to
barData
. The issue and challenge is here:Ideally, the fix would just be:
But
dataDef[extend]
is frozen.