diff --git a/frontend/src/bundles/studio/helpers/scenes-exceed-scripts.ts b/frontend/src/bundles/studio/helpers/scenes-exceed-scripts.ts index ed6773451..832dcd6d3 100644 --- a/frontend/src/bundles/studio/helpers/scenes-exceed-scripts.ts +++ b/frontend/src/bundles/studio/helpers/scenes-exceed-scripts.ts @@ -1,16 +1,18 @@ import { type Scene, type Script } from '../types/types.js'; +const INITIAL_DURATION = 0; + const scenesExceedScripts = (scenes: Scene[], scripts: Script[]): boolean => { const totalScenesDuration = scenes.reduce( (accumulator, scene) => accumulator + scene.duration, - 0, + INITIAL_DURATION, ); const totalScriptsDuration = scripts.reduce( (accumulator, script) => accumulator + script.duration, - 0, + INITIAL_DURATION, ); return totalScenesDuration > totalScriptsDuration; }; -export { scenesExceedScripts }; +export { scenesExceedScripts }; \ No newline at end of file