Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If a variable passed to view is 0 (int), the "echo" will be empty #25

Closed
danilopolani opened this issue Feb 12, 2018 · 5 comments
Closed
Assignees
Labels
Type: Bug The issue has indentified a bug
Milestone

Comments

@danilopolani
Copy link

In my controller, I pass variables to my view like this:

return view.render('search', {
  total: 0
})

From my view, if I do {{ total }} it will be empty, but it works if I pass the variable like a string:

return view.render('search', {
  total: '0'
})
@thetutlage thetutlage self-assigned this Feb 13, 2018
@thetutlage thetutlage added the Type: Bug The issue has indentified a bug label Feb 13, 2018
@thetutlage thetutlage added this to the 2.0 milestone May 23, 2018
@adamlc
Copy link

adamlc commented Sep 25, 2018

Any fixes for this? Just built a large CMS and noticed this, would be a real PITA to change everything to be strings!

@anhnt
Copy link

anhnt commented Dec 9, 2018

got the same bug

@RomainLanz
Copy link
Member

It's already fixed in the new version of Edge that should be out soon.
Stay tunned!

@adamlc
Copy link

adamlc commented Feb 15, 2019

@RomainLanz any updates on this? I noticed it doesn't seem to be working in 1.1.4 either

@richie3366
Copy link

Since we were not sure if the new version of edge (which fixed the issue) was ready to use for us, we made a quick fix on a fork repo (https://github.com/Pickaw/edge) that you can also fork to use it on your project.

With Yarn, you can specify a peer resolution by adding this property in your package.json file:

  "resolutions": {
    "**/edge.js": "Pickaw/edge"
  },

WARN: I recommend to fork our repo and use "githubUsername/edge" in your resolutions property, since we could delete our repo at any time when we won't need it anymore.

thetutlage added a commit that referenced this issue Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue has indentified a bug
Projects
None yet
Development

No branches or pull requests

6 participants