File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
packages/components/timed-text-editor/UpdateTimestamps Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,13 @@ function adjustTimecodesBoundaries(words) {
100100}
101101
102102function interpolate ( wordsList ) {
103- const words = interpolationOptimization ( wordsList ) ;
104- const indicies = [ ...Array ( words . length ) . keys ( ) ] ;
103+ const indicies = [ ...Array ( wordsList . length ) . keys ( ) ] ;
105104 const indiciesWithStart = [ ] ;
106105 const indiciesWithEnd = [ ] ;
107106 const startTimes = [ ] ;
108107 const endTimes = [ ] ;
109108
110- words . forEach ( ( word , index ) => {
109+ wordsList . forEach ( ( word , index ) => {
111110 if ( 'start' in word ) {
112111 indiciesWithStart . push ( index ) ;
113112 startTimes . push ( word . start ) ;
@@ -121,7 +120,7 @@ function interpolate(wordsList) {
121120 // http://borischumichev.github.io/everpolate/#linear
122121 const outStartTimes = everpolate . linear ( indicies , indiciesWithStart , startTimes ) ;
123122 const outEndTimes = everpolate . linear ( indicies , indiciesWithEnd , endTimes ) ;
124- const wordsResults = words . map ( ( word , index ) => {
123+ const wordsResults = wordsList . map ( ( word , index ) => {
125124 if ( ! ( 'start' in word ) ) {
126125 word . start = outStartTimes [ index ] ;
127126 }
You can’t perform that action at this time.
0 commit comments