From: Iskren Chernev Date: Thu, 3 Oct 2013 18:28:16 +0000 (-0700) Subject: Use traditional for to loop through lists array X-Git-Tag: 2.3.0~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edbdfa937d960d44e49f6bc1615a3faedc6eba9a;p=thirdparty%2Fmoment.git Use traditional for to loop through lists array --- diff --git a/moment.js b/moment.js index 5d59c87f4..4e2fe791d 100644 --- a/moment.js +++ b/moment.js @@ -1408,10 +1408,8 @@ return obj instanceof Duration; }; - for (i in lists) { - if (lists.hasOwnProperty(i)) { - makeList(lists[i]); - } + for (i = lists.length - 1; i >= 0; --i) { + makeList(lists[i]); } // for use by developers when extending the library