-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array prototype conflict #112
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The function added to Array prototype cause conflict with "for( var in ) " statement. So please change the way this function is working, my suggestion is
remove these functions
Array.prototype.toNumber
Array.prototype.dtp_toDate
and add the following
of course the call to the function should be changed as well
return [this.getFullYear(), this.getMonth() + 1, this.getDate()].dtp_toDate();
=>
return dtp_toDate([this.getFullYear(), this.getMonth() + 1, this.getDate()]);
Actually adding this method to prototype does not make sense as the function is not working for any array rather only array with 3 elements (Y M D).
The text was updated successfully, but these errors were encountered: