Should be:
```
if (this.options.buttons && this.options.buttons.length) {
```