1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 21:15:45 +02:00

fix(frontend): MkRadiosのslotでv-ifを使用すると空白のoptionが生成される問題を修正 (#16832)

* fix: MkRadiosのslotでv-ifを使用すると空白のoptionが生成される問題を修正 (MisskeyIO#1105)

* Update Changelog

* Update CHANGELOG.md

---------

Co-authored-by: あわわわとーにゅ <17376330+u1-liquid@users.noreply.github.com>
This commit is contained in:
かっこかり
2025-11-25 08:56:30 +09:00
committed by GitHub
parent 91dafc26a7
commit 043b9b3d26
2 changed files with 4 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
<script lang="ts">
import { defineComponent, h, ref, watch } from 'vue';
import { Comment, defineComponent, h, ref, watch } from 'vue';
import MkRadio from './MkRadio.vue';
import type { VNode } from 'vue';
@@ -35,7 +35,7 @@ export default defineComponent({
if (options.length === 1 && options[0].props == null) options = options[0].children as VNode[];
// vnodeのうちv-if=falseなものを除外する(trueになるものはoptionなど他typeになる)
options = options.filter(vnode => !(typeof vnode.type === 'symbol' && vnode.type.description === 'v-cmt' && vnode.children === 'v-if'));
options = options.filter(vnode => vnode.type !== Comment);
return () => h('div', {
class: [