Comparing version 5.3.1 to 5.3.2
@@ -259,6 +259,7 @@ 'use strict'; | ||
const helper = require(file); | ||
const required = require(file); | ||
const offset = path.slice(-1) === Path.sep ? 0 : 1; | ||
const name = file.slice(path.length + offset, -Path.extname(file).length); | ||
const helper = required[name] || required.default || required; | ||
if (typeof helper === 'function') { | ||
const offset = path.slice(-1) === Path.sep ? 0 : 1; | ||
const name = file.slice(path.length + offset, -Path.extname(file).length); | ||
engine.module.registerHelper(name, helper); | ||
@@ -265,0 +266,0 @@ } |
{ | ||
"name": "vision", | ||
"description": "Templates rendering plugin support for hapi.js", | ||
"version": "5.3.1", | ||
"version": "5.3.2", | ||
"repository": "git://github.com/hapijs/vision", | ||
@@ -17,3 +17,3 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"test": "lab -a code -t 100 -L", | ||
"test": "lab -a code -t 100 -L -I '__core-js_shared__'", | ||
"test-cov-html": "lab -a code -r html -o coverage.html", | ||
@@ -20,0 +20,0 @@ "lint": "lab -L -d" |
Sorry, the diff of this file is too big to display
184166
120
3462