moment-duration-format
Advanced tools
Comparing version 2.2.1 to 2.2.2
{ | ||
"name": "moment-duration-format", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "A moment.js plugin for formatting durations.", | ||
@@ -5,0 +5,0 @@ "main": "lib/moment-duration-format.js", |
@@ -1,4 +0,4 @@ | ||
/*! Moment Duration Format v2.2.1 | ||
/*! Moment Duration Format v2.2.2 | ||
* https://github.com/jsmreese/moment-duration-format | ||
* Date: 2018-01-21 | ||
* Date: 2018-02-16 | ||
* | ||
@@ -733,3 +733,3 @@ * Duration format plugin function for the Moment.js library | ||
// Treat invalid durations as having a value of 0 milliseconds. | ||
if (this.isValid() === false) { | ||
if (typeof this.isValid === "function" && this.isValid() === false) { | ||
asMilliseconds = 0; | ||
@@ -1415,3 +1415,3 @@ asMonths = 0; | ||
if (isNegative && (momentType.value > 0 || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) { | ||
if (isNegative && (momentType.value > 0 || trim === "" || find(stopTrim, momentType.type) || find(outputTypes, momentType.type))) { | ||
out += "-"; | ||
@@ -1418,0 +1418,0 @@ isNegative = false; |
{ | ||
"name": "moment-duration-format", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "A moment.js plugin for formatting durations.", | ||
@@ -5,0 +5,0 @@ "main": "lib/moment-duration-format.js", |
Sorry, the diff of this file is too big to display
674518
18414