DataZombies / jQTouch

jQT extensions jqt.activityIndicator, jqt.bars (with numeric badges), jqt.checkGroup & jqt.segmentedControl.Get updates via Twitter http://twitter.com/HeadDZombie. If you find this fork useful please make a donation via PayPal (http://tinyurl.com/2fpmx27). See below for demo links.
MIT License
159 stars 34 forks source link

jqt.bars plugin: little bug with getPath #28

Closed josefadamcik closed 13 years ago

josefadamcik commented 13 years ago

Hi, just found this little bug in plugin jqt bars in getPath() function. When the first script element in page doesnt' have a src attribute, getPath breaks on undefined. Just added check for it.

DataZombies commented 13 years ago

I've got a question and a comment on the pull request.

josefadamcik commented 13 years ago

I'v added another commit with moved declaration of variable i.

signaturedigital commented 13 years ago

This breaks module loaders like LABjs and Require. I'm currently using LABjs and getPath breaks. I'm trying to comment it out but then the code doesn't seem to return jQT.setPageHeight properly

signaturedigital commented 13 years ago

Yeah, adding the if check puts the app into an infinite loop in the console: index.html:154TypeError: Result of expression 'jQT.getOrientation' [undefined] is not a function.

DataZombies commented 13 years ago

Thanks for moving the "var" statement. (see previous comment about being anal)

DataZombies commented 13 years ago

I've applied your fix. Thanks!