Open datho7561 opened 1 year ago
What do you expect the ?? would apply to? What's the priority here? Does it apply to vertxRequest.getParam('sandwich') or the whole !inject expression, which would resolve to a boolean. @mkouba thoughts?
There's actually the same message for {#if inject:vertxRequest.getParam('sandwich')??}
There is the same problem without !
{#if inject:vertxRequest.getParam('sandwich')??}
no sandwich ;-;
{/}
What do you expect the ?? would apply to? What's the priority here? Does it apply to vertxRequest.getParam('sandwich') or the whole !inject expression, which would resolve to a boolean. @mkouba thoughts?
??
denotes a "safe expression"; it's just a shorthand notation for .or(null)
, i.e. inject:vertxRequest.getParam('sandwich')??
becomes inject:vertxRequest.getParam('sandwich').or(null)
. And nul
l is a valid value, it is considered falsy
and outputs an empty string.
Given the following template fragment:
The
??
is marked with a warning by qute-ls saying it's an invalid object. However, this template renders fine.