Skip to content
Browse files

Merge pull request #4 from Nami-Doc/patch-2

domify() returns an array, not a single element
  • Loading branch information...
2 parents 9f66b6a + fdeb19e commit 080f2f973e1a8dc8a3f42672d47cbae810522378 @tj tj committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 index.js
View
5 index.js
@@ -1,4 +1,3 @@
-
/**
* Module dependencies.
*/
@@ -19,7 +18,7 @@ module.exports = Counter;
*/
function Counter() {
- this.el = domify('<div class="counter"></div>');
+ this.el = domify('<div class="counter"></div>')[0];
this._digits = [];
this.n = 0;
this.digits(2);
@@ -46,7 +45,7 @@ Counter.prototype.digits = function(n){
*/
Counter.prototype.addDigit = function(){
- var el = domify(digit);
+ var el = domify(digit)[0];
this._digits.push(el);
this.el.appendChild(el);
};

0 comments on commit 080f2f9

Please sign in to comment.
Something went wrong with that request. Please try again.