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

Fix a bug introduced in #25 #27

Merged
merged 1 commit into from Feb 14, 2017

Conversation

insertjokehere
Copy link
Contributor

Setting a googleanalytics_fields key to True as in #25 causes the resulting Javascript to also include the literal True, which is not valid.
This works around that by setting the key to 'true' which when evaluated in an if statement is truthy, serving the same purpose

I also tried using {{h.dump_json(googleanalytics_fields)|safe}} and loading that in using JSON.parse, but h.dump_json seems to return invalid JSON when used in a template

Setting a googleanalytics_fields key to `True` as in ckan#25 causes the
resulting Javascript to also include the literal `True`, which is not
valid. This works around that by setting the key to `'true'` which
when evaluated in an if statement is truthy, serving the same purpose
@smotornyuk smotornyuk self-assigned this Feb 9, 2017
@smotornyuk smotornyuk merged commit f57820f into ckan:master Feb 14, 2017
@camfindlay
Copy link

👍

@camfindlay
Copy link

Should this be a 2.1.1 release then? Non-breaking new feature introduced + bug fix.

@smotornyuk
Copy link
Member

smotornyuk commented Feb 15, 2017

In that case we will end up with v3 too soon. Currently there is small stack of issues and one interesting pull request(unfortunately, without descrtiption, but this change will be quite useful after work finished), so let's at least wait for few more additions

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

Successfully merging this pull request may close these issues.

None yet

3 participants