mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:22 +08:00
UX: avoid flashing error when loading form template (#28700)
This commit is contained in:
parent
460b875d03
commit
289249303c
|
@ -276,11 +276,7 @@ export default class DEditor extends Component.extend(
|
|||
@discourseComputed("formTemplateIds", "replyingToTopic", "editingPost")
|
||||
showFormTemplateForm(formTemplateIds, replyingToTopic, editingPost) {
|
||||
// TODO(@keegan): Remove !editingPost once we add edit/draft support for form templates
|
||||
if (formTemplateIds?.length > 0 && !replyingToTopic && !editingPost) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return formTemplateIds?.length > 0 && !replyingToTopic && !editingPost;
|
||||
}
|
||||
|
||||
@discourseComputed("placeholder")
|
||||
|
|
|
@ -87,7 +87,7 @@ export default class FormTemplateFieldWrapper extends Component {
|
|||
/>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{else if this.error}}
|
||||
<div class="alert alert-error">
|
||||
{{this.error}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user