_createClass(SlotBuffer, [{
key: "size",
value: function size() {
- if (this.head >= tail) {
- return head - tail;
+ if (this.head >= this.tail) {
+ return this.head - this.tail;
}
return this.array.length + this.head - this.tail;
}
return null;
}
- if (this.head >= this.tail && index >= head) {
+ if (this.head >= this.tail && index >= this.head) {
return null;
}