]> git.ipfire.org Git - thirdparty/moment.git/commit
[Easy] Don't enumerate momentProperties with 'in'
authorBill Schaller <billschaller@fb.com>
Wed, 8 Mar 2017 19:03:30 +0000 (14:03 -0500)
committerIskren Chernev <iskren.chernev@gmail.com>
Sat, 11 Mar 2017 23:33:32 +0000 (01:33 +0200)
commit7e1f710ac07c98776ef7d03c43eb5395aa01a4c0
tree23667c616178665db18cb2ce90886ee52355e31e
parent238929d93477401f5604f3692801312b759e117b
[Easy] Don't enumerate momentProperties with 'in'

Because of the way many polyfill libraries modify Array.prototype (without Object.defineProperty), enumerating momentProperties with for...in is unsafe.

This is a zero-cost change that makes this enumeration safe.
src/lib/moment/constructor.js