if(dojo.every(this.todos, function(item){ return item != newObject; })){ this.todos.push(newObject); this.invalidate(); }