You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 10, 2019. It is now read-only.
// This try-catch is necessary because references to undefined variables
59
+
// in underscore templates are eval()ed directly as javascript, and as
60
+
// such will throw very real exceptions that will shatter the whole build
61
+
// process if we don't handle them.
62
+
try{
63
+
renderedHTML=compiled(_.extend(data||{},{
64
+
_allData: data,
65
+
_partials: partials
66
+
}));
67
+
}catch(e){
68
+
varerrorMessage="WARNING: the underscore template "+template.fileName+" threw an exception; it probably just tried to reference an undefined variable. Is this pattern maybe missing a .json file?";
69
+
console.log(errorMessage,e);
70
+
renderedHTML="<h1>Error in underscore template</h1>"+errorMessage;
0 commit comments