posthtml / posthtml-loader

PostHTML for Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to check if a variable is set?

thewebartisan7 opened this issue · comments

commented

Suppose we have a variable for set body class.
In case we don't pass any variable as body class I get class="undefined"

How to check if variable is set?

Like:

<body class="{{ if(bodyClass) bodyClass }}">
or
<body class="{{ bodyClass ? bodyClass : 'default' }}">
commented

Ops sorry wrong repo...