diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/wiki-data.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index 7d2cfa9f..f044b2a1 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -1,6 +1,9 @@ // Utility functions for interacting with wiki data. -import {empty} from './sugar.js'; +import { + accumulateSum, + empty, +} from './sugar.js'; // Generic value operations @@ -382,7 +385,7 @@ export function getFlashLink(flash) { } export function getTotalDuration(tracks) { - return tracks.reduce((duration, track) => duration + track.duration, 0); + return accumulateSum(tracks, track => track.duration); } export function getTrackCover(track, {to}) { |