moneyadviceservice/frontend-sandbox — pull request #3 by neoeno (2014-07-28 15:29:29+00:00)
Title: IE8 fixes (for...in to forEach, submit loop)

Testing form-validator.js within IE8 I came up against two browser quirks.

IE8 doesn't have `Array#filter`, so I added es5-shim. The for...in loops then iterated over the added properties of Array because there wasn't a hasOwnProperty check in the loop. Rather than add one, I've switched to use `Array#forEach` (since you're using es5 features anyway).

IE8 also got into a loop between `FormValidator#handleFormSubmit` and `FormValidator#checkForm`, which submitted the form again, thereby triggering `handleFormSubmit` again. This caused a stack overflow. I've put in a flag so `handleFormSubmit` returns true if the form has already been submitted.

Hope this is helpful. Let me know if you need anything tweaked.
Caden