The following code returns the "Unused ReferenceError: Undefined Size" error in Chrome if the size of the variable is undefined:
<script type="text/x-jquery-tmpl"> {{if name && size}} <p>${name}</p> <p>${size}</p> {{/if}} </script>
So far, this code is working fine :
<script type="text/x-jquery-tmpl"> {{if name}} {{if size}} <p>${name}</p> <p>${size}</p> {{/if}} {{/if}} </script>
Is there any way to make it work in Chrome without using the double if statement, and why does it even return an error?
source share