Fix render template for number template parts (#9406) (#9407)

This commit is contained in:
Rémi Alvergnat
2021-11-04 18:33:56 +01:00
committed by GitHub
parent 942d7d39fe
commit 198fb67b6f

View File

@@ -2,7 +2,7 @@
<div ref="templateEl" class="render-template">
<span class="vertical-aligner" />
<template v-for="(part, index) in parts" :key="index">
<value-null v-if="part === null || part.value === null" />
<value-null v-if="part === null || (typeof part === 'object' && part.value === null)" />
<component
:is="`display-${part.component}`"
v-else-if="typeof part === 'object' && part.component"
@@ -14,7 +14,8 @@
:collection="part.collection"
:field="part.field"
/>
<span v-else>{{ translate(part) }}</span>
<span v-else-if="typeof part === 'string'">{{ translate(part) }}</span>
<span v-else>{{ part }}</span>
</template>
</div>
</template>