objectivehtml / FlipClock

http://flipclockjs.com/
MIT License
2.74k stars 954 forks source link

JS Error for TwelveHourClock Face (Minified) #57

Closed ryanburst closed 10 years ago

ryanburst commented 10 years ago

Issue: index.toLowerCase() within the localize method for the FlipClock.Factory class throws a JS error when attempting to create a new TwelveHourClock face instance.

Recreate: var clock = $('.current-clock').FlipClock({clockFace: 'TwelveHourClock'});

Error thrown: Uncaught TypeError: Cannot call method 'toLowerCase' of undefined

Possible Fix: Change: var lindex = index.toLowerCase(); to var lindex = index ? index.toLowerCase() : '';

objectivehtml commented 10 years ago

This has been fixed in the 0.4.0 update.