freqdec/slabText — pull request #23 by patocallaghan (2013-02-25 22:52:04+00:00)
Title: Infinite loop of resizeSlabs 'while' if parentWidth is 0

Hey,

I found an issue where I was trying to use slabText in a rotator but forgot that if something is set to `display: none` it doesn't have a width/height. This caused slabText to go into an infinite loop in the `while` in the `resizeSlabs` function and kill my browser (tested in FF/Chrome on Windows).

I'm not sure if it's the most elegant solution but I added a sanity check to prevent the infinite looping if the parentWidth is 0. It simply drops out of `resizeSlabs`.

Thanks,
Pat