Skip to content

Commit 552be41

Browse files
committed
fix: issue with editor not opening due to threadCopy.addPoll not being present
1 parent 5a62656 commit 552be41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/layout/Editor.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
</div>
146146

147147
<!-- Poll Creator -->
148-
<poll-creator v-if="threadCopy.addPoll" @poll-validation="onPollValidation"></poll-creator>
148+
<poll-creator v-if="threadCopy?.addPoll" @poll-validation="onPollValidation"></poll-creator>
149149

150150
<!-- Editor -->
151151
<form name="form" class="editor-form" novalidate>
@@ -219,7 +219,7 @@
219219
<button class="inverted-button cancel" @click="cancel()">
220220
Cancel
221221
</button>
222-
<button class="send" @click.prevent="createAction(threadCopy).then(closeEditor);" :disabled="!threadCopy?.title.length || !canCreate() || (threadCopy.addPoll && !threadCopy.pollValid)">
222+
<button class="send" @click.prevent="createAction(threadCopy).then(closeEditor);" :disabled="!threadCopy?.title.length || !canCreate() || (threadCopy?.addPoll && !threadCopy.pollValid)">
223223
<i class="fa fa-paper-plane" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;Start Thread
224224
</button>
225225

0 commit comments

Comments
 (0)