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) {
});
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');
});