Following situation:
test.tpl
{% for i in news %}
{{ i.title }}
{% endfor %}
test.js
require("jinjs").registerExtension(".tpl");
var main_template = require("./test");
var context = { news : [{title: "test one"}, {title: "test two"}]};
console.log(main_template.render(context));
Then, node test.js gives me the following error:
var _fref = new $$.s || [], _prev_loop = $$.loop, _prev_key = $$['i'], _prev_value = null, k = null, v = null, i = 0, l = 0, x = null, last_v = null, last_k = null;
^
TypeError: $$.s is not a constructor
Changing to foo and the error goes away
If I replace news with foo or bnews, then the error doesn't occur anymore.
However, the error still occurs for words like newsarticles.
Following situation:
test.tpl
test.js
Then,
node test.jsgives me the following error:Changing to
fooand the error goes awayIf I replace
newswithfooorbnews, then the error doesn't occur anymore.However, the error still occurs for words like
newsarticles.