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
Looks like Nunjucks 2.0 is unusable in a web browser without configuration. If it's not meant to be useable, this situation should throw a custom error message instead, indicating the issue.
The webloader doesn't check to see if the opts argument has been provided (i guess it's not optional?)
var WebLoader = Loader.extend({
init: function(baseURL, opts) {
this.baseURL = baseURL || '.';
// By default, the cache is turned off because there's no way
// to "watch" templates over HTTP, so they are re-downloaded
// and compiled each time. (Remember, PRECOMPILE YOUR
// TEMPLATES in production!)
this.useCache = opts.useCache;
// We default `async` to false so that the simple synchronous
// API can be used when you aren't doing anything async in
// your templates (which is most of the time). This performs a
// sync ajax request, but that's ok because it should *only*
// happen in development. PRECOMPILE YOUR TEMPLATES.
this.async = opts.async;
},
but when calling new Environment(), a new WebLoader is created without the opt argument.
Looks like Nunjucks 2.0 is unusable in a web browser without configuration. If it's not meant to be useable, this situation should throw a custom error message instead, indicating the issue.
The webloader doesn't check to see if the opts argument has been provided (i guess it's not optional?)
but when calling new Environment(), a new WebLoader is created without the opt argument.
The text was updated successfully, but these errors were encountered: