deprecations = {},
- lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'];
+ lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'],
+
+ updateInProgress = false;
// Pick the first defined of two or three arguments. dfl comes from
// default.
}
copyConfig(this, config);
this._d = new Date(+config._d);
- if (moment.updateOffset) {
+ // Prevent infinite loop in case updateOffset creates new moment
+ // objects.
+ if (updateInProgress === false) {
+ updateInProgress = true;
moment.updateOffset(this);
+ updateInProgress = false;
}
}