mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 12:38:21 -05:00
UX: Add render check for multi-select caret icon (#36796)
Prevents a console error when the icon is null due to max item validation being reached. [Related meta topic](https://meta.discourse.org/t/svg-icon-missing-error-with-dropdown-settings-in-theme-object-settings-when-max-input-is-reached/391708/2) ### Before / After <img width="1516" height="955" alt="image" src="https://github.com/user-attachments/assets/dad7cee2-93d0-4559-a28b-bffcc4c87b70" />
This commit is contained in:
@@ -42,7 +42,9 @@ export default class ComboBoxHeader extends SingleSelectHeaderComponent {
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
{{icon this.caretIcon class="caret-icon"}}
|
||||
{{#if this.caretIcon}}
|
||||
{{icon this.caretIcon class="caret-icon"}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</template>
|
||||
}
|
||||
|
||||
@@ -65,8 +65,9 @@ export default class MultiSelectHeader extends SelectKitHeaderComponent {
|
||||
@content={{or this.selectedContent this.selectKit.noneItem}}
|
||||
@selectKit={{this.selectKit}}
|
||||
/>
|
||||
|
||||
{{icon this.caretIcon class="caret-icon"}}
|
||||
{{#if this.caretIcon}}
|
||||
{{icon this.caretIcon class="caret-icon"}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user