JavaScript Errors - v1.0.3 - t.bind() is undefined



  • I noticed that threads weren't automatically retrieving new posts, so I checked the console and found these errors:

    Uncaught TypeError: Cannot read property 'bind' of undefined (nodebb.min.js). The prettified function causing this error is below and the error occurs on the line with t.bind()

        function p() {
            require(["search", "mousetrap"], function(e, t) {
                $(".topic-search").on("click", ".prev", function() {
                    e.topicDOM.prev()
                }).on("click", ".next", function() {
                    e.topicDOM.next()
                });
                t.bind("ctrl+f", function(e) {
                    if (config.topicSearchEnabled) {
                        var t = ajaxify.currentPage.match(/^topic\/([\d]+)/), n;
                        if (t) {
                            e.preventDefault();
                            n = t[1];
                            $("#search-fields input").val("in:topic-" + n + " ");
                            app.prepareSearch()
                        }
                    }
                })
            })
        }
    

    I just did a fresh server rebuild, so maybe I screwed something up, or maybe this has been happening for a while and I didn't notice.


  • Admin

    function p()? (e, t)? Fun 😄

    Have you tried updating to latest version of NodeBB?



  • @julian Yeah, it's minified, obviously, but I figured the "ctrl+f" binding would be enough to locate the function in the full version.

    And I thought 1.0.3 was the latest? Do you mean the weekly or master branch or something?


  • Admin

    @Shaun Yeah, the master branch... might have been fixed already.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.