jQuery UI Autocomplete Combobox _renderItem returns “TypeError: Item is undefined”

jQuery UI Autocomplete Combobox _renderItem returns “TypeError: Item is undefined”

When attempting to use a custom _renderItem, I keep receiving the error TypeError: item is undefined at .append(item.label) . This is using jQueryUI 1.11.4. I'm not sure why this is happening. From everything I've searched and read, this should work. Any help would be greatly appreciated.

  1.         (function($) {
  2.             $.widget("custom.combobox", {
  3.                 _create: function() {
  4.                     this.wrapper = $("<span>")
  5.                         .addClass("custom-combobox")
  6.                         .insertAfter(this.element);
  7.                     this.element.hide();
  8.                     this._createAutocomplete();
  9.                     this._createShowAllButton();
  10.                 },
  11.                 _createAutocomplete: function() {
  12.                     var selected = this.element.children(":selected");
  13.                     var value = selected.val() ? selected.text().trim() : "";
  14.                     this.input = $('<input>')
  15.                         .appendTo(this.wrapper)
  16.                         .val(value)
  17.                         .attr("title", "")
  18.                         .addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left")
  19.                         .autocomplete({
  20.                             delay: 0,
  21.                             minLength: 0,
  22.                             source: $.proxy(this, "_source")
  23.                         })
  24.                         .tooltip({ tooltipClass: "ui-state-highlight" })
  25.                         .data("ui-autocomplete")._renderItem = function(ul, item) {
  26.                             return $("<li></li>")
  27.                                 .data("ui-autocomplete", item)
  28.                                 .append(item.label)
  29.                                 .appendTo(ul);
  30.                         }
  31.                     this._on(this.input, {
  32.                         autocompleteselect: function(event, ui) {
  33.                             ui.item.option.selected = true;
  34.                             this._trigger("select", event, { item: ui.item.option });
  35.                         },
  36.                         autocompletechange: "_removeIfInvalid"
  37.                     });
  38.                 },
  39.                 _createShowAllButton: function() {
  40.                     var input = this.input;
  41.                     var wasOpen = false;
  42.                     $("<a>")
  43.                         .attr("tabIndex", -1)
  44.                         .appendTo(this.wrapper)
  45.                         .button({
  46.                             icons: { primary: "ui-icon-triangle-1-s" },
  47.                             text: false
  48.                         })
  49.                         .removeClass("ui-corner-all")
  50.                         .addClass("ui-corner-right ui-button-icon")
  51.                         .mousedown(function() { wasOpen = input.autocomplete("widget").is(":visible"); })
  52.                         .click(function() {
  53.                             if (wasOpen) {
  54.                                 return;
  55.                             }
  56.                             $(this).blur();
  57.                             input.autocomplete("search", "");
  58.                             input.focus();
  59.                 _source: function(request, response) {
  60.                     var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
  61.                     response(this.element.children("option").map(function() {
  62.                         var text = $(this).text();
  63.                         if (this.value && (! request.term || matcher.test(text))) {
  64.                             return {
  65.                                 label: text,
  66.                                 value: text,
  67.                                 option: this
  68.                             };
  69.                         }
  70.                     }));
  71.                 },
  72.                 _removeIfInvalid: function( event, ui ) {
  73.                     if (ui.item) {
  74.                         return;
  75.                     }
  76.                     var value = this.input.val();
  77.                     var valueLowerCase = value.toLowerCase();
  78.                     var valid = false;
  79.                     this.element.children("option").each(function() {
  80.                         if ($(this).text().toLowerCase() === valueLowerCase ) {
  81.                             this.selected = valid = true;
  82.                             return false;
  83.                         }
  84.                     });
  85.                     if (valid) {
  86.                         return;
  87.                     }
  88.                     this.input.val("").tooltip("open");
  89.                     this.element.val("");
  90.                     this._delay(function() { this.input.tooltip("close").attr("title", ""); }, 2500);
  91.                     this.input.autocomplete("instance").term = "";
  92.                  },
  93.                 _destroy: function() {
  94.                     this.wrapper.remove();
  95.                     this.element.show();
  96.                 }
  97.             })
  98.         })(jQuery);