Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Fixes "include" tag compilation when parentFile is null #407

Closed
wants to merge 1 commit into from

Conversation

tvavrys
Copy link
Contributor

@tvavrys tvavrys commented Jan 22, 2014

I ran into "Uncaught TypeError: Cannot call method 'replace' of null " during browser client-side rendering.

Javascript

var html = swig.render(tmpl, {'locals': {
    'project': self.model.attributes
}});

Template

<div class="inner{% if project.is_loading %} loading{% endif %}">
    <div class="thumbnail">
        <a href="{{ project.absolute_url }}"><img alt="{{ project.name }}" src="{{ project.image_card_url }}"></a>
    </div>
    <h3 class="title"><a href="{{ project.absolute_url }}">{{ project.name }}</a></h3>
    <a class="desc">{{ project.description }}</a>
    <div class="actions">
        {% include "project/includes/project_button_activate.html" %}
    </div>
</div>

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

Successfully merging this pull request may close these issues.

1 participant