Skip to content
This repository has been archived by the owner on Dec 10, 2019. It is now read-only.

Commit

Permalink
Fix an incorrect referency to pattern.key, which should now become pa…
Browse files Browse the repository at this point in the history
…ttern.patternPartial
  • Loading branch information
geoffp committed Aug 1, 2016
1 parent 51ec0b3 commit 01df245
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/engine_underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ _.mixin({
dataIn instanceof Object && currentContext instanceof Object) {
data = addParentContext(data, currentContext);
}

compiled = _.template(partial);

return compiled(data);
Expand Down Expand Up @@ -106,8 +105,8 @@ var engine_underscore = {
return renderedHTML;
},

registerPartial: function (oPattern) {
partialRegistry[oPattern.key] = oPattern.template;
registerPartial: function (pattern) {
partialRegistry[pattern.patternPartial] = pattern.template;
},

// find and return any {{> template-name }} within pattern
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "patternengine-node-underscore",
"description": "The Underscore engine for Pattern Lab / Node",
"version": "1.1.0",
"version": "1.1.1",
"main": "lib/engine_underscore.js",
"dependencies": {
"underscore": "^1.8.3"
Expand Down

0 comments on commit 01df245

Please sign in to comment.