You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v-html behaviour also differs in SSR and client. SSR renders v-html: <span>null</span> while it changes into <span></span> on client side. Seems <span v-html="foo"> is being optimized into '<span>' + (_vm.foo). So we can change it into (_vm.foo|| '') to handle this inconsistency during SSR render.
The text was updated successfully, but these errors were encountered:
Version
2.4.2
Reproduction link
https://glitch.com/edit/#!/v-text
https://v-text.glitch.me/html
https://v-text.glitch.me/text
Steps to reproduce
Try to render
<span v-text="x"></span>
wherex
is isnull
orundefined
What is expected?
It may be gracefully handled just like
v-html
directive (see notes below) or client side version ofv-text
.What is actually happening?
Throwing an internal
TypeError
:Seems the simple fix would be defining a default value for
s
parameter in util.js (or better do astring
type check on value)Related to nuxt/nuxt#1638
Some Notes
v-html
behaviour also differs in SSR and client. SSR rendersv-html: <span>null</span>
while it changes into<span></span>
on client side. Seems<span v-html="foo">
is being optimized into'<span>' + (_vm.foo)
. So we can change it into(_vm.foo|| '')
to handle this inconsistency during SSR render.The text was updated successfully, but these errors were encountered: