Skip to content

Commit ac6a6b7

Browse files
Fix issue when option isn't passed
1 parent 8c06475 commit ac6a6b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)