mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
fixed cap error and requires list
This commit is contained in:
parent
4e3b6262ca
commit
d1ee189208
2 changed files with 3 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
var List = require("./list.js").List;
|
||||
|
||||
exports.Channel = function(name, server, type, id, isPrivate){
|
||||
|
||||
if(!type){ //there's no second argument
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ exports.List.prototype.add = function( child ) {
|
|||
|
||||
function addChild(child){
|
||||
|
||||
if(self.length() > cap){
|
||||
if(self.length() > self.cap){
|
||||
self.splice(0, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue