diff --git a/packages/x-components/src/components/display-emitter.vue b/packages/x-components/src/components/display-emitter.vue index ee55f2881c..720c9a0506 100644 --- a/packages/x-components/src/components/display-emitter.vue +++ b/packages/x-components/src/components/display-emitter.vue @@ -50,7 +50,7 @@ * because Vue2 only allows a single root node. Then, `getCurrentInstance()?.proxy?.$el` to * retrieve the HTML element in both versions. */ - return () => slots.default?.()[0] ?? h(); + return () => slots.default?.()[0] ?? ''; } }); diff --git a/packages/x-components/src/components/result/result-variants-provider.vue b/packages/x-components/src/components/result/result-variants-provider.vue index a3d705e685..52f602e9df 100644 --- a/packages/x-components/src/components/result/result-variants-provider.vue +++ b/packages/x-components/src/components/result/result-variants-provider.vue @@ -128,7 +128,7 @@ { immediate: true } ); - return () => slots.default?.({ result: resultToProvide.value })[0] ?? h(); + return () => slots.default?.({ result: resultToProvide.value })[0] ?? ''; } }); diff --git a/packages/x-components/src/composables/use-no-element-render.ts b/packages/x-components/src/composables/use-no-element-render.ts index 7c85e18e86..78a1f4ea5b 100644 --- a/packages/x-components/src/composables/use-no-element-render.ts +++ b/packages/x-components/src/composables/use-no-element-render.ts @@ -10,8 +10,8 @@ import { h, SetupContext, VNode } from 'vue'; */ export function useNoElementRender( slots: { [key: string]: VNode[] | undefined } | SetupContext['slots'] -): VNode | VNode[] { +): VNode | VNode[] | string { const defaultSlotContent = typeof slots.default === 'function' ? slots.default() : slots.default; - return defaultSlotContent ?? h(); + return defaultSlotContent ?? ''; } diff --git a/packages/x-components/src/views/home/display-result-provider.vue b/packages/x-components/src/views/home/display-result-provider.vue index 4df6d9e39c..5cd960b15a 100644 --- a/packages/x-components/src/views/home/display-result-provider.vue +++ b/packages/x-components/src/views/home/display-result-provider.vue @@ -16,7 +16,7 @@ } }); - return () => slots.default?.()[0] ?? h(); + return () => slots.default?.()[0] ?? ''; } }); diff --git a/packages/x-components/src/x-modules/extra-params/components/renderless-extra-param.vue b/packages/x-components/src/x-modules/extra-params/components/renderless-extra-param.vue index a680dff9e0..52454c4641 100644 --- a/packages/x-components/src/x-modules/extra-params/components/renderless-extra-param.vue +++ b/packages/x-components/src/x-modules/extra-params/components/renderless-extra-param.vue @@ -37,7 +37,7 @@ xBus.emit('UserChangedExtraParams', { [props.name]: newValue }); } - return () => slots.default?.({ value, updateValue })[0] ?? h(); + return () => slots.default?.({ value, updateValue })[0] ?? ''; } }); diff --git a/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue b/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue index eba758f822..ce1f68ca5e 100644 --- a/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue +++ b/packages/x-components/src/x-modules/facets/components/lists/exclude-filters-with-no-results.vue @@ -44,7 +44,7 @@ ); provide('filters', filtersWithResults); - return () => slots.default?.({ filters: filtersWithResults.value }) ?? h(); + return () => slots.default?.({ filters: filtersWithResults.value }) ?? ''; } }); diff --git a/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue b/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue index b69b707569..78fa8603c1 100644 --- a/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue +++ b/packages/x-components/src/x-modules/facets/components/lists/sorted-filters.vue @@ -52,7 +52,7 @@ }); provide('filters', sortedFilters); - return () => slots.default?.({ filters: sortedFilters.value }) ?? h(); + return () => slots.default?.({ filters: sortedFilters.value }) ?? ''; } }); diff --git a/packages/x-components/src/x-modules/scroll/components/main-scroll.vue b/packages/x-components/src/x-modules/scroll/components/main-scroll.vue index 07151b1935..745ec33f5a 100644 --- a/packages/x-components/src/x-modules/scroll/components/main-scroll.vue +++ b/packages/x-components/src/x-modules/scroll/components/main-scroll.vue @@ -203,7 +203,7 @@ * because Vue2 only allows a single root node. Then, `getCurrentInstance()?.proxy?.$el` to * retrieve the HTML element in both versions. */ - return () => slots.default?.()[0] ?? h(); + return () => slots.default?.()[0] ?? ''; } });