Skip to content

Bad resolve with template async parameter #470

@DblK

Description

@DblK

Blaze: 3.0.0 (2.6.1 worked fine but no promise at that time)
Meteor: 3.0.2

Since my migration of my application to Meteor 3.0, I figure out that some variable of template seems not to be resolve the way it used to be.

Here is an example :

<template name="Test>
  <!-- Working -->
  {{#if myProp}}
     Yeah!
  {{else}}
    Dooh
  {{/if}}
  <!-- Not working -->
  <div class="base {{#if myProp}}additional-class{{/if}}">
  Content
  </div>
</template>

If I use within blaze :

{{#Test myProp=asyncProp}}

with :

Template.XXX.helpers({
   async asyncProp() {
     return await something(); // return true
   }
})

The template will always display Dooh instead of Yeah.
I expected once the resolve had been done, to pass the new value to the template so it can revaluate it and change the display accordingly.

Did I miss something there?

PS: repo to reproduce the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions