cubiq / iscroll

Smooth scrolling for the web
http://iscrolljs.com
MIT License
12.87k stars 3.8k forks source link

IScroll not defined when loading with RequireJS ?? #1027

Closed btburton42 closed 8 years ago

btburton42 commented 8 years ago

We're using iScroll for a particular component on our site and with the latest release we're seeing IScroll is not defined(…) when trying to call new IScroll xxx in our AMD component.

I see that you recently added AMD support. Have you noticed any regressions?

Passing it in as a named variable in the define block has no effect.

btburton42 commented 8 years ago

nvm. once the header was configured correctly we were good to go.

alvarotrigo commented 8 years ago

@btburton42 how did you solve it?? What header are you talking about?

btburton42 commented 8 years ago

our UMD header. it was not passing iScroll in as an AMD defined variable, but instead defaulting to the window object. so once iScroll gained AMD support this was failing. just had to name some variables correctly.