]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Replace arrow function
authorKunal Marwaha <marwahaha@berkeley.edu>
Wed, 30 Nov 2016 06:06:54 +0000 (01:06 -0500)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 2 Mar 2017 08:45:50 +0000 (10:45 +0200)
src/lib/duration/constructor.js

index 994adab4fc10b6b32564a94f7551f48e8566c24b..9dd98e3e80366268e02b8e9320f3db0efda49d5d 100644 (file)
@@ -6,7 +6,9 @@ export function Duration (duration) {
     var normalizedInput = normalizeObjectUnits(duration);
 
     this._isValid = isDurationValid(normalizedInput);
-    this.isValid = () => this._isValid;
+    this.isValid = function () {
+        return this._isValid;
+    };
 
     var years = this._isValid && normalizedInput.year || 0,
         quarters = this._isValid && normalizedInput.quarter || 0,