1
0
mirror of https://github.com/S2-/ejs-render-remote synced 2025-08-03 05:00:03 +02:00

2 Commits

Author SHA1 Message Date
s2
47459bd322 1.0.9 2020-02-07 20:50:08 +01:00
s2
6ed2b48d36 log async ejs compile error to console 2020-02-07 20:50:01 +01:00
3 changed files with 11 additions and 7 deletions

View File

@@ -40,11 +40,15 @@
getTemplateFn.then(function(template) { getTemplateFn.then(function(template) {
var templateOptions = overwriteWithCacheOptions(options, templateUrl); var templateOptions = overwriteWithCacheOptions(options, templateUrl);
$('#' + r).replaceWith(ejs.render( try {
template, $('#' + r).replaceWith(ejs.render(
data, template,
templateOptions data,
)); templateOptions
));
} catch(ex) {
console.error(templateUrl, ex);
}
//clean up the getFnFor //clean up the getFnFor
if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) { if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) {

View File

@@ -1 +1 @@
Hello <%= name%>! Hello <%= name %>!

View File

@@ -1,6 +1,6 @@
{ {
"name": "ejs-render-remote", "name": "ejs-render-remote",
"version": "1.0.8", "version": "1.0.9",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"homepage": "https://github.com/S2-/ejs-render-remote", "homepage": "https://github.com/S2-/ejs-render-remote",