diff --git a/lib/moment-duration-format.js b/lib/moment-duration-format.js index f9038f3..d8c6e97 100644 --- a/lib/moment-duration-format.js +++ b/lib/moment-duration-format.js @@ -30,6 +30,11 @@ root.momentDurationFormatSetup = root.moment ? factory(root.moment) : factory; } })(this, function (moment) { + // Resolves es6 module loading issue + if (moment.version === undefined && moment.default) { + moment = moment.default; + } + // `Number#tolocaleString` is tested on plugin initialization. // If the feature test passes, `toLocaleStringWorks` will be set to `true` and the // native function will be used to generate formatted output. If the feature