• Usualy the plugin works fine, but every now and then I get this error, resulting in not showing of the featured image:

    Uncaught TypeError: $el.backstretch is not a function
        at _backstretchHandler (/wp-content/plugins/display-featured-image-genesis/includes/js/backstretch-set.js?ver=2.6.2:27)
        at Object.plugin.init (/wp-content/plugins/display-featured-image-genesis/includes/js/backstretch-set.js?ver=2.6.2:7)
        at HTMLDocument.<anonymous> (/wp-content/plugins/display-featured-image-genesis/includes/js/backstretch-set.js?ver=2.6.2:57)
        at i (jquery.js:2)
        at Object.add [as done] (jquery.js:2)
        at a.fn.init.n.fn.ready (jquery.js:2)
        at /wp-content/plugins/display-featured-image-genesis/includes/js/backstretch-set.js?ver=2.6.2:51
        at /wp-content/plugins/display-featured-image-genesis/includes/js/backstretch-set.js?ver=2.6.2:60
    

    Is there anything I can do to prevent this?

Viewing 1 replies (of 1 total)
  • Thread Starter micksp

    (@micksp)

    I see the backstretch.js script is being loaded asynchronously. Looks like it’s too late sometimes. The backstretch-set.js script is also loaded asynchronously, but there is a dependency between the two.
    I suggest you use some packagig tool to turn the JS files into 1 app.min.js thereby solving the interdependency.

Viewing 1 replies (of 1 total)
  • The topic ‘occasional “uncaught TypeError”’ is closed to new replies.