Skip to content

Commit cdc6519

Browse files
author
mark442
committed
修改view-koa案列中 初始化nunjucks时 path参数未使用的bug
1 parent 7502c46 commit cdc6519

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samples/node/web/koa/view-koa/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (! isProduction) {
3131
app.use(bodyParser());
3232

3333
// add nunjucks as view:
34-
app.use(templating('view', {
34+
app.use(templating('views', {
3535
noCache: !isProduction,
3636
watch: !isProduction
3737
}));

samples/node/web/koa/view-koa/templating.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function createEnv(path, opts) {
77
watch = opts.watch || false,
88
throwOnUndefined = opts.throwOnUndefined || false,
99
env = new nunjucks.Environment(
10-
new nunjucks.FileSystemLoader('views', {
10+
new nunjucks.FileSystemLoader(path, {
1111
noCache: noCache,
1212
watch: watch,
1313
}), {

0 commit comments

Comments
 (0)