WebDevTmas / moment-round

Plugin for momentjs to round time in dates.
Other
47 stars 75 forks source link

Fix issue if Array has had its prototype extended #2

Closed cjsewell closed 9 years ago

cjsewell commented 9 years ago

In my project I have extended Array like so: Array.prototype.first = function ();

This causes an issue as the loop on Line 24 also includes Array prototype properties leading to a "is not a function error". This pull request ensures that the function about to to be called is indeed a function first.

WebDevTmas commented 9 years ago

Thank you, sorry for the delay