From e672a7fb5c155607af731bc13fa8519269d40355 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 25 Aug 2024 00:20:02 +0200 Subject: [PATCH] [Media UI] Always normalize the `duration` field to float. --- .../backend/http/webapp/src/components/Media/Controls.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platypush/backend/http/webapp/src/components/Media/Controls.vue b/platypush/backend/http/webapp/src/components/Media/Controls.vue index 72fcd3e206..293335834d 100644 --- a/platypush/backend/http/webapp/src/components/Media/Controls.vue +++ b/platypush/backend/http/webapp/src/components/Media/Controls.vue @@ -199,7 +199,11 @@ export default { computed: { duration() { - return this.status?.duration != null ? this.status.duration : this.track?.duration + const duration = this.status?.duration != null ? this.status.duration : this.track?.duration + if (duration != null) + return parseFloat(duration) + + return null }, trackImage() {