barisusakli / nodebb-plugin-dbsearch

A plugin that uses the database for search
16 stars 24 forks source link

Uncaught TypeError: Cannot set property 'term' of null #25

Closed frodesigns closed 8 years ago

frodesigns commented 8 years ago

getSearchPreferences() function does not seem to exist.

       $("#search-form").on("submit", function() {
            var e = $(this).find("input");
            require(["search"], function(t) {
                var n = t.getSearchPreferences();
                n.term = e.val(); //error here because n is null
                t.query(n, function() {
                    e.val("")
                })
            });
            return false
        });