Skip to content

Commit b86a300

Browse files
committed
Allow select self
1 parent c483372 commit b86a300

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

apps/builder/app/builder/features/settings-panel/props-section/animation/subject-select.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ export const SubjectSelect = ({
116116
const parsedValue = animationActionSchema.safeParse(newValue);
117117

118118
if (parsedValue.success) {
119-
const subject = subjects.find((s) => s.value === newValue.subject);
119+
const subjectItem = subjects.find((s) => s.value === subject);
120120

121-
if (subject === undefined) {
121+
if (subjectItem === undefined) {
122122
toast.error(`Subject "${newValue.subject}" not found`);
123123
return;
124124
}
125125

126126
if (
127-
subject.isTimelineExists === false &&
127+
subjectItem.isTimelineExists === false &&
128128
newValue.subject !== undefined
129129
) {
130130
serverSyncStore.createTransaction(
@@ -139,7 +139,7 @@ export const SubjectSelect = ({
139139
styleSources,
140140
styleSourceSelections,
141141
styles
142-
)(subject.instanceId, "viewTimelineName", {
142+
)(subjectItem.instanceId, "viewTimelineName", {
143143
type: "unparsed",
144144
value: newValue.subject,
145145
});

0 commit comments

Comments
 (0)