Skip to content

Commit

Permalink
Very old and annoying bug in chapter editor. should have been done ea…
Browse files Browse the repository at this point in the history
…rlier

Rebuild the chapter editor #182
  • Loading branch information
Xavier Mouton-Dubosc committed Sep 26, 2022
1 parent 72051a9 commit 7674e46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion applications/chapters_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
let sound_element, component_element, list_element, edit_source_audio_element, edit_source_webvtt_element;
let sound_CPU;
let line_number = 1;
let convert = document.CPU;
let convert = null;

const point_canvas = {
text : '',
Expand Down Expand Up @@ -33,6 +33,9 @@ function normalize_time(currentTime) {
if ((currentTime === '') || (!currentTime)) {
return null;
}
if (typeof currentTime === 'string') {
currentTime = convert.timeInSeconds(currentTime);
}
return Math.abs(Math.floor(Number(currentTime)));
}

Expand Down

0 comments on commit 7674e46

Please sign in to comment.