I have a question about my underscore template. Here is the section of code in question:
<% if (typeof title !== "undefined") { %>
<p class="title"><%= title %></p>
<% } %>
Is there a way to avoid using the global scope when rendering this template without name spacing the data? I am unable to safely remove title
from the global scope as it is not my own code and requires reliance on undefined
. Any suggestions would be greatly appreciated.