]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
adding hasOwnProperty check for #593
authorTim Wood <washwithcare@gmail.com>
Wed, 23 Jan 2013 18:24:08 +0000 (10:24 -0800)
committerTim Wood <washwithcare@gmail.com>
Wed, 23 Jan 2013 18:24:08 +0000 (10:24 -0800)
moment.js

index 6f727ba9a0258b3108370c790c20a38dd5fcb0e2..5bff2f3d1ecc6a7e452e12b959809e513b3c62df 100644 (file)
--- a/moment.js
+++ b/moment.js
 
     function extend(a, b) {
         for (var i in b) {
-            a[i] = b[i];
+            if (b.hasOwnProperty(i)) {
+                a[i] = b[i];
+            }
         }
         return a;
     }