Permalink
Browse files

domify() returns an array, not a single element

  • Loading branch information...
1 parent 9f66b6a commit fdeb19ee0493be4564870062ef7839983564e9df @vendethiel vendethiel committed Dec 2, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 index.js
View
@@ -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 fdeb19e

Please sign in to comment.