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

NSNumber treated as context for rendering blocks #83

Closed
robinkunde opened this issue Sep 12, 2014 · 5 comments
Closed

NSNumber treated as context for rendering blocks #83

robinkunde opened this issue Sep 12, 2014 · 5 comments

Comments

@robinkunde
Copy link

In 7.2 the following data and template don't work the same way as in 7.1:

data =@[
  @{
    @"name": @"name", 
    @"isSubscribed": [NSNumber numberWithBool:YES], 
    @"actionUrl": @"http://"
  }
]
{{#data}}
  {{#.isSubscribed}}
    <a href="{{{.actionUrl}}}" class="style1">{{.name}}</a>
  {{^}}
    <a href="{{{.actionUrl}}}" class="style2">{{.name}}</a>
  {{/}}
{{/data}}

In 7.2, actionUrl and name come back blank, unless I remove the dot in front.

@groue
Copy link
Owner

groue commented Sep 13, 2014

Hi @sapheriel. This is clearly a regression. Let me look for a fix. Can you use 7.1 until a fix is shipped?

@groue
Copy link
Owner

groue commented Sep 13, 2014

There is another compatibility issue (#82).

I advise you to keep using GRMustache v7.1.0. GRMustache v7.2.0 will be flagged as a rotten version. Sorry for the inconvenience.

groue added a commit that referenced this issue Sep 13, 2014
groue added a commit that referenced this issue Sep 13, 2014
@groue
Copy link
Owner

groue commented Sep 13, 2014

@sapheriel Thanks a lot for noticing this issue.

@groue
Copy link
Owner

groue commented Sep 13, 2014

Fixed by v7.3.0

@robinkunde
Copy link
Author

Glad I could help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants