"Uncaught TypeError: undefined is not a function" occurring when jScrollPane is included in code optimized/minified by r.js

212 views
Skip to first unread message

Jim Koch

unread,
Nov 6, 2014, 12:04:32 PM11/6/14
to jscro...@googlegroups.com
Hi everyone,

I'm wondering if anyone has run across this issue before. We are using require.js to load jScrollPane (and other files), and things work great in our development environment when we are using non-optimized code (i.e. each file is loaded separately).

However, after running the r.js optimizer to create an optimized/minified version, the jScrollPane plugin is no longer working, throwing an "Uncaught TypeError: undefined is not a function" error. 

It seems like the optimization process is breaking something in jScrollPane, as things work fine when I exclude the plugin from the build. All of our other files are working properly, and I'm able to replicate the issue when I set up a test project with only jScrollPane, so it definitely seems to be something with the plugin.  

Any ideas on what might be happening here? I'd prefer to not have to download a separate file just for this plugin.

Thanks,
Jim Koch

Reply all
Reply to author
Forward
0 new messages