]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
fix linting errors
authorSam Thomas <samuel.thomas@qubit.com>
Thu, 10 Nov 2016 21:48:32 +0000 (16:48 -0500)
committerIskren Chernev <iskren.chernev@gmail.com>
Sat, 12 Nov 2016 06:12:45 +0000 (22:12 -0800)
src/lib/moment/constructor.js
src/test/moment/create.js

index a42301420559487e68fa657f7a201c3a44e97c12..83f83effe5c0892d9b6abdcb5b2580ae30fb3249 100644 (file)
@@ -60,7 +60,9 @@ var updateInProgress = false;
 export function Moment(config) {
     copyConfig(this, config);
     this._d = new Date(config._d != null ? config._d.getTime() : NaN);
-    if (!this.isValid()) this._d = new Date(NaN);
+    if (!this.isValid()) {
+        this._d = new Date(NaN);
+    }
     // Prevent infinite loop in case updateOffset creates new moment
     // objects.
     if (updateInProgress === false) {
index 53b29789cb2309be7f0f6cdb8711c35c746c6a95..ba6ba4f9d769000ebafac2c7bb8d4c8206036993 100644 (file)
@@ -1102,6 +1102,6 @@ test('parsing only meridiem results in invalid date', function (assert) {
 });
 
 test('invalid dates return invalid for methods that access the _d prop', function (assert) {
-    var momentAsDate = moment(['2015', '12', '1']).toDate()
+    var momentAsDate = moment(['2015', '12', '1']).toDate();
     assert.equal(momentAsDate, 'Invalid Date', 'toDate returns invalid');
 });