Since it doesn't make sense to have more than one match for the content element I'm using first() to make this sure.
if (this.options.contentId) {
this.$content = $('#'+this.options.contentId);
} else if (this.$element.siblings('[data-off-canvas-content]').length) {
- this.$content = this.$element.siblings('[data-off-canvas-content]');
+ this.$content = this.$element.siblings('[data-off-canvas-content]').first();
} else {
this.$content = this.$element.closest('[data-off-canvas-content]').first();
}