Fix: Fixed the regression from last commit

This commit is contained in:
Aria Minaei 2021-07-03 15:40:58 +02:00
parent 2a671b129d
commit d1b2787809
2 changed files with 6 additions and 7 deletions

View file

@ -22,9 +22,8 @@ describe(`SheetObjectTemplate`, () => {
obj: {
trackIdByPropPath: {
[encodePathToProp(['position', 'x'])]: asSequenceTrackId('x'),
[encodePathToProp(['position', 'invalid'])]: asSequenceTrackId(
'invalidTrack',
),
[encodePathToProp(['position', 'invalid'])]:
asSequenceTrackId('invalidTrack'),
},
trackData: {
x: null as $IntentionalAny,
@ -78,9 +77,8 @@ describe(`SheetObjectTemplate`, () => {
obj: {
trackIdByPropPath: {
[encodePathToProp(['position', 'x'])]: asSequenceTrackId('x'),
[encodePathToProp(['position', 'invalid'])]: asSequenceTrackId(
'invalidTrack',
),
[encodePathToProp(['position', 'invalid'])]:
asSequenceTrackId('invalidTrack'),
},
trackData: {
x: null as $IntentionalAny,
@ -91,6 +89,7 @@ describe(`SheetObjectTemplate`, () => {
},
})
debugger
const iter = iterateOver(
obj.template.getMapOfValidSequenceTracks_forStudio(),
)

View file

@ -19,7 +19,7 @@ const cachedDefaults = new WeakMap<PropTypeConfig, SerializableValue>()
export default function getPropDefaultsOfSheetObject(
config: SheetObjectConfig<$IntentionalAny>,
): SerializableMap {
return getDefaultsOfPropTypeConfig(config.props) as $IntentionalAny
return getDefaultsOfPropTypeConfig(config) as $IntentionalAny
}
function getDefaultsOfPropTypeConfig(