From cca62145bb34d82da88d952ad5a2bab0c0b66c45 Mon Sep 17 00:00:00 2001 From: DisLido Date: Wed, 30 Nov 2022 10:27:24 +0800 Subject: [PATCH] fix cache should be the same as line 96 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 928d3d3..c34ed18 100644 --- a/index.js +++ b/index.js @@ -76,7 +76,7 @@ function koaEjs (app, settings) { const viewPath = path.join(settings.root, view) debug(`render: ${viewPath}`) // get from cache - if (settings.cache && cache[viewPath]) return cache[viewPath](options.scope, options) + if (settings.cache && cache[viewPath]) return cache[viewPath].call(options.scope, options) const tpl = await settings.fs.readFile(viewPath, 'utf8')