Skip to content

Commit

Permalink
domify() returns an array, not a single element
Browse files Browse the repository at this point in the history
  • Loading branch information
vendethiel committed Dec 2, 2012
1 parent 9f66b6a commit fdeb19e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
@@ -1,4 +1,3 @@

/**
* Module dependencies.
*/
Expand All @@ -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);
Expand All @@ -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);
};
Expand Down

0 comments on commit fdeb19e

Please sign in to comment.