Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Commit 547cdd1

Browse files
committed
Fix interpolation component when there are empty text nodes
1 parent 4e7a15f commit 547cdd1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/components/interpolation.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ function onlyHasDefaultPlace (params) {
5454

5555
function useLegacyPlaces (children, places) {
5656
const params = places ? createParamsFromPlaces(places) : {}
57+
58+
// Filter empty text nodes
59+
children = (children || []).filter(child => {
60+
return child.tag || (child.text = child.text.trim())
61+
})
62+
5763
if (!children) { return params }
5864

5965
const everyPlace = children.every(vnodeHasPlaceAttribute)

0 commit comments

Comments
 (0)