Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Commit

Permalink
Fixes listener adding error.
Browse files Browse the repository at this point in the history
Prior, all listeners were attached to the `attribute` object, instead of the
`attributes.listeners` object. So adding a click listener would result in
`attributes.click` existing, instead of `attributes.listeners.click`. This
patch fixes this.
  • Loading branch information
chrisdotcode committed Mar 7, 2016
1 parent 37b49c8 commit 5d12564
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/lmth.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function parseAttributes(attributes) {

if (attribute.startsWith('on') &&
(typeof(property) === 'function' || Array.isArray(property))) {
addListener(attribute.slice(2), property, nodeAttributes);
addListener(attribute.slice(2), property, nodeAttributes.listeners);
} else {
nodeAttributes[attribute] = property;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lmth",
"version": "5.0.0-rc1",
"version": "5.0.0-rc2",
"description": "A \"type-safe\" HTML DSL for JavaScript environments.",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit 5d12564

Please sign in to comment.