]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Update deprecate.js 2489/head
authorXaar37 <fabien.pilet@live.fr>
Thu, 16 Jul 2015 06:50:31 +0000 (08:50 +0200)
committerXaar37 <fabien.pilet@live.fr>
Thu, 16 Jul 2015 06:50:31 +0000 (08:50 +0200)
src/lib/utils/deprecate.js

index a076ad71950c57bc4ccf47e064d8487d4ca535de..df4286b8435f4a78528d1e9db21883b2d611d6eb 100644 (file)
@@ -8,12 +8,11 @@ function warn(msg) {
 }
 
 export function deprecate(msg, fn) {
-    var firstTime = true,
-        msgWithStack = msg + '\n' + (new Error()).stack;
+    var firstTime = true;
 
     return extend(function () {
         if (firstTime) {
-            warn(msgWithStack);
+            warn(msg + '\n' + (new Error()).stack);
             firstTime = false;
         }
         return fn.apply(this, arguments);