Skip to content

Commit

Permalink
fix bookCopies quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
janantala committed Aug 31, 2013
1 parent 02d5810 commit 7526731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/Book.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ BookModelSchema.virtual('bookId').get(function(){
});

BookModelSchema.methods.createCopies = function(){
for (var i=this.copies.length; i<=this.quantity; i++) {
for (var i=this.copies.length; i<this.quantity; i++) {
this.copies.push({});
}
};
Expand Down

0 comments on commit 7526731

Please sign in to comment.