dustjs
dustjs copied to clipboard
@ helper's don't work
Is this nested structure supposed to work?
feed.dust
{#activities}
{@select key=category}
{@eq value="event"}{>"views/snapshot/event"/}{/eq}
{/select}
{/activities}
event.dust
<div class="row activity {name} {category} reset-lineheight">
<div class="col-xs-1">
<span class="svg {icon_class}"></span>
</div>
<div class="col-xs-11">
<header>
<i class="text-muted text-note">{@gt key=counter value="1" type="number"}{strings.last_time} {/gt}{formatted_datetime}</i>
</header>
</div>
</div>
Inside the partial event
none of the @ helpers function correctly. If I output {counter} or do a context dump the correct value appears. In case it was a type issue I added a string property with a static value and did an @eq test on it which also failed to produce output. {:else} blocks are also not displayed it's as if the entire condition is stripped somehow.
Is this a bug? If I change the @select in the parent view to @eq checks the @ helpers inside event
do function as you'd expect them to. The reason it's an @select is because there are about 10 different views depending on the value of category.
I have similar issue with Node.js 8.8.1 version
<div>Hello World</div>
{@eq key="true" value="true"}
<div>Hello 1</div>
{:else}
<div>Hello 2</div>
{/eq}
{@eq}
is not executing at all when I switch to Node.js 6.10.2 ... things just work fine.
We are facing the same issue as mentioned by @hegdeashwin @monsterlane what is the node version you are using? Also, are you using dust on server-side templating?
yeah. It's blocking us to migrate to node 8
@kumarrishav have fixed the node 8 bug here ... can anyone please help us to merge the PR?
I'll give it a look :)
On Thu, Dec 7, 2017, 6:30 AM Ashwin Hegde [email protected] wrote:
@kumarrishav https://github.com/kumarrishav have fixed the node 8 bug here https://github.com/linkedin/dustjs-helpers/pull/146 ... can anyone please help us to merge the PR?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/linkedin/dustjs/issues/776#issuecomment-349983332, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVa7BNlcq0SmmPA3slBN3IYkOeCb0CKks5s9_aQgaJpZM4PcVOO .
--
Sent while mobile