Skip to content

Commit 5681821

Browse files
Fix issue when option isn't passed (#61)
1 parent 8c06475 commit 5681821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/plugins/nunjucks/context.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function context(request) {
4242
throw Error('Missing baseLayoutPath in plugin.options.nunjucks')
4343
}
4444

45-
if ('viewContext' in pluginStorage) {
45+
if (typeof pluginStorage.viewContext === 'function') {
4646
consumerViewContext = pluginStorage.viewContext(request)
4747
}
4848

0 commit comments

Comments
 (0)