Error using autocomplete

Im getting the following error :

Uncaught TypeError: Cannot use 'in' operator to search for 'length' in

This is the code i found for the auto-complete that has “in”:

 function( $ ) {

fm.autocomplete = {

    prepare_options: function( raw_opts ) {
        var opts = [];
        for ( var k in raw_opts ) opts.push( { label: raw_opts[k], value: k } );
        return opts;

Any idea how to fix this? I’ve read similar questions with this error but couldn’t figure it out.

Read more here: Error using autocomplete

Leave a Reply

Your email address will not be published. Required fields are marked *