Inline unnecessary addBufferAtIndex method

This commit is contained in:
Max Brunsfeld
2017-11-02 11:56:54 -07:00
parent 5f4d955cb1
commit b7ae57bdbe

View File

@@ -646,11 +646,7 @@ class Project extends Model {
} }
addBuffer (buffer, options = {}) { addBuffer (buffer, options = {}) {
return this.addBufferAtIndex(buffer, this.buffers.length, options) this.buffers.push(buffer)
}
addBufferAtIndex (buffer, index, options = {}) {
this.buffers.splice(index, 0, buffer)
this.subscribeToBuffer(buffer) this.subscribeToBuffer(buffer)
this.emitter.emit('did-add-buffer', buffer) this.emitter.emit('did-add-buffer', buffer)
return buffer return buffer