Skip to content

Commit

Permalink
Fixed Handlebars helpers feature
Browse files Browse the repository at this point in the history
Handlebars helpers was registered by calling  'registerPartial' instead of 'registerHelper'

Changed index.js to call helpers with 'registerHelper', and added some JetBrains IDE specifics to .gitignore in the process
  • Loading branch information
Mark B. Refsing committed Nov 4, 2015
1 parent f807d58 commit b45886b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.DS_Store
node_modules
test/_build
npm-debug.log
npm-debug.log

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
*.iml
.idea/
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = function(settings) {

try {
helper = require(path.join(process.cwd(), helpers[i]));
Handlebars.registerPartial(name, helper);
Handlebars.registerHelper(name, helper);
}
catch (e) {
console.warn('Error when loading ' + name + '.js as a Handlebars helper.');
Expand Down

0 comments on commit b45886b

Please sign in to comment.