From: Sam Thomas Date: Thu, 10 Nov 2016 21:48:32 +0000 (-0500) Subject: fix linting errors X-Git-Tag: 2.17.0~7^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65a1fc8c692d67487b48001259e901664265aefd;p=thirdparty%2Fmoment.git fix linting errors --- diff --git a/src/lib/moment/constructor.js b/src/lib/moment/constructor.js index a42301420..83f83effe 100644 --- a/src/lib/moment/constructor.js +++ b/src/lib/moment/constructor.js @@ -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) { diff --git a/src/test/moment/create.js b/src/test/moment/create.js index 53b29789c..ba6ba4f9d 100644 --- a/src/test/moment/create.js +++ b/src/test/moment/create.js @@ -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'); });