CMS Development

tkruger
Participant | Gold Partner
Participant | Gold Partner

Developing custom module using shufflejs with error

Hi All!

 

I am working with shufflejs (https://vestride.github.io/Shuffle/) on codepen, and it works fine however when I put it in a HubSpot module I get the following error.

 

Codepen: https://codepen.io/tkruger/pen/dyqKYBz

 

Error in HubSpot module:

tkruger_0-1679598418348.png

Spoiler
module_107677899044_filtering-content.min.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'shouldStopExecution')
at shufflejs._removeActiveClassFromChildren (module_107677899044_filtering-content.min.js:1:1422)
at shufflejs._handleFilterClick (module_107677899044_filtering-content.min.js:1:1103)

I downloaded shuffle.min.js file and included in with the module under linked files.

https://cdnjs.cloudflare.com/ajax/libs/Shuffle/6.1.0/shuffle.min.js

 

Please any advice, thank you

 

0 Upvotes
1 Reply 1
tkruger
Participant | Gold Partner
Participant | Gold Partner

Developing custom module using shufflejs with error

I switched to using filterizr instead of shufflejs and it works fine with HubSpot.  https://yiotis.net/filterizr/#/

 

I would like to know why the error happen though in case I run into this again using js libraries with HubSpot.

0 Upvotes