Skip to content
This repository was archived by the owner on Sep 6, 2018. It is now read-only.
This repository was archived by the owner on Sep 6, 2018. It is now read-only.

In some cases files fail to compile but no error is emitted #13

@robframpton

Description

@robframpton

Say I have a .soy file with the following template and $results is not defined.

/**
 * @param? results
 */
{template .results}
	<div class="search-result-container">
		{foreach $result in $results}
			<span>{$result.title}</span>
		{/foreach}
	</div>
{/template}

The file will fail to compile but no errors are thrown notifying the developer that something has gone wrong.

If the template is fixed by checking for $results everything compiles fine.

/**
 * @param? results
 */
{template .results}
	<div class="search-result-container">
		{if $results}
			{foreach $result in $results}
				<span>{$result.title}</span>
			{/foreach}
		{/if}
	</div>
{/template}

It would be nice to know that one of my files failed to compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions