1
0
mirror of https://github.com/S2-/ejs-render-remote synced 2025-08-04 21:30:07 +02:00

1 Commits

Author SHA1 Message Date
s2
37a2512f4b v1.0.3 2019-04-14 22:05:08 +02:00
2 changed files with 7 additions and 6 deletions

View File

@@ -14,6 +14,12 @@
//if the template is already cached, return it and we are done //if the template is already cached, return it and we are done
if (templateFn) { if (templateFn) {
//but first check if there is still a getter function for this template in the cache
//if yes, remove it so we clean up a bit
if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) {
ejs.cache.remove('getFnFor' + templateUrl);
}
return templateFn(data); return templateFn(data);
} else { //if the template is not cached, we need to get it and render it later once we have it. remember: this happens only if the template is not already cached } else { //if the template is not cached, we need to get it and render it later once we have it. remember: this happens only if the template is not already cached
@@ -35,11 +41,6 @@
filename: templateUrl filename: templateUrl
} }
)); ));
//clean up the getFnFor
if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) {
ejs.cache.remove('getFnFor' + templateUrl);
}
}); });
return '<span class="ejs-templateplaceholder" style="display: none;" id="' + r + '"></span>'; return '<span class="ejs-templateplaceholder" style="display: none;" id="' + r + '"></span>';

View File

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