Skip to content

Commit 01ed3cf

Browse files
committed
fix: add new poll option only when all of the current options are filled
1 parent 8864c7a commit 01ed3cf

File tree

1 file changed

+1
-0
lines changed
  • src/messageComposer/middleware/pollComposer

1 file changed

+1
-0
lines changed

src/messageComposer/middleware/pollComposer/state.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export const pollCompositionStateProcessors: Partial<
128128
...optionListTail,
129129
];
130130

131+
// Add new option if all the options are filled
131132
if (!newOptions.some((option) => !option.text.trim())) {
132133
newOptions.push({ id: generateUUIDv4(), text: '' });
133134
}

0 commit comments

Comments
 (0)