title: Why am I getting this JS error?
body: <p>I get this JS error:</p>
  
  <pre><code>jquery-1.5.1.min.js:16Uncaught TypeError: Cannot set property '_renderItem' of undefined
  d.d.extend._Deferred.f.resolveWithjquery-1.5.1.min.js:16
  d.d.extend.readyjquery-1.5.1.min.js:16
  d.c.addEventListener.A
  </code></pre>
  
  <p>and it's from this code for the jquery UI autocomplete plugin in my application.js file:</p>
  
  <pre><code>    .data( "autocomplete" )._renderItem = function( ul, item ) {
           return $( "&lt;li&gt;&lt;/li&gt;" )
             .data( "item.autocomplete", item )
             .append( "&lt;a&gt;" + item.topic.name + "&lt;/a&gt;" )
             .appendTo( ul );
              };
  </code></pre>
  
  <p>I get this code whenever I load a page that does NOT have the text field that the autocomplete code is acting on. Why and how can I get rid of this error?</p>
  
  <p>I'd like to note that although I am getting this error, my application is working normally. Should I even be worrying about this error? </p>