title: cannot read property addOption on undefine in javascript selectize
body: <p>I am trying to implement search and each time getting this error...
  cannot read property 'addOption' on undefine in javascript selectize.
  I have checked that my result array have data. </p>
  
  <p>My js code.</p>
  
  <pre><code> var selectSearchValue, $selectSearchValue;
          var results = [];
          var list_selector = $('.data-list');
  
          list_selector.each(function (value) {
  
              results.push({
                  id: $(this).attr('data-id'),
                  name: $(this).attr('data-name'),
                  code: $(this).attr('data-code'),
                  hall: $(this).attr('data-hall'),
                  location: $(this).attr('data-location')
  
  
              });
  
          });
  
          selectSearchValue.addOption(results);
          selectSearchValue.refreshOptions();
  
  
          $selectSearchValue = $('#searchItems').selectize({
              valueField: 'id',
              labelField: 'name',
              searchField: ['hall', 'name', 'code', 'location'],
              render: {
                  option: function (item, escape) {
                      return '&lt;div class="item-wrap"&gt;' +
                              '&lt;span class="name"&gt;' + escape(item.hall) + '&lt;/span&gt;' +
                              '&lt;span class="code"&gt;' + escape(item.code) + '&lt;/span&gt;' + '&lt;div class="clearfix"&gt;&lt;/div&gt;' +
                              '&lt;span class="venue-name"&gt;' + escape(item.name) + ', &lt;/span&gt;' +
                              '&lt;span class="location"&gt;' + escape(item.location) + '&lt;/span&gt;' +
                              '&lt;/div&gt;';
  
  
                  }
  
  
              }
          });
          selectSearchValue = $selectSearchValue[0].selectize;
  </code></pre>