Skip to content

Commit 741bc6b

Browse files
committed
fix a bg
1 parent 760f40c commit 741bc6b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/Voting/Form.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ onSetup((post) => {
3434
...post,
3535
options: [
3636
...post.options.filter((option) => option.key !== '#poll'),
37-
{
38-
key: '#poll',
39-
value: poll,
40-
},
37+
poll.options.length > 0
38+
? {
39+
key: '#poll',
40+
value: poll,
41+
}
42+
: undefined,
4143
],
4244
}
4345

0 commit comments

Comments
 (0)