diff options
Diffstat (limited to 'src/js/utils')
-rw-r--r-- | src/js/utils/events.js | 4 | ||||
-rw-r--r-- | src/js/utils/time.js | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/js/utils/events.js b/src/js/utils/events.js index 87c35d26..31571b2d 100644 --- a/src/js/utils/events.js +++ b/src/js/utils/events.js @@ -90,9 +90,7 @@ export function triggerEvent(element, type = '', bubbles = false, detail = {}) { // Create and dispatch the event const event = new CustomEvent(type, { bubbles, - detail: Object.assign({}, detail, { - plyr: this, - }), + detail: { ...detail, plyr: this,}, }); // Dispatch the event diff --git a/src/js/utils/time.js b/src/js/utils/time.js index ffca88b2..17228de5 100644 --- a/src/js/utils/time.js +++ b/src/js/utils/time.js @@ -13,7 +13,7 @@ export const getSeconds = value => Math.trunc(value % 60, 10); export function formatTime(time = 0, displayHours = false, inverted = false) { // Bail if the value isn't a number if (!is.number(time)) { - return formatTime(null, displayHours, inverted); + return formatTime(undefined, displayHours, inverted); } // Format time component to add leading zero |