File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -537,19 +537,20 @@ async function assembleWorkerStructure(
537537 json . mactions = SpeechGeneratorUtil . connectMactionSelections ( mml , sxml ) ;
538538 json . speech = SpeechGeneratorUtil . computeSpeechStructure ( sxml ) ;
539539 const root = ( sxml . childNodes [ 0 ] as Element ) ?. getAttribute ( 'id' ) ;
540- if ( options . braille !== 'none' ) {
541- await setupEngine ( {
542- modality : 'braille' ,
543- locale : options . braille ,
544- domain : 'default' ,
545- style : 'default'
546- } ) ;
547- json . braille = SpeechGeneratorUtil . computeBrailleStructure ( sxml ) ;
548- json . braillelabel = json . braille [ root ] [ 'braille-none' ] ;
549- }
550540 json . label = json . speech [ root ] [ 'speech-none' ] ;
551541 json . ssml = json . speech [ root ] [ 'speech-ssml' ] ;
552542 json . translations = Object . assign ( { } , LOCALE . MESSAGES . navigate ) ;
543+ if ( options . braille === 'none' ) {
544+ return json ;
545+ }
546+ await setupEngine ( {
547+ modality : 'braille' ,
548+ locale : options . braille ,
549+ domain : 'default' ,
550+ style : 'default'
551+ } ) ;
552+ json . braille = SpeechGeneratorUtil . computeBrailleStructure ( sxml ) ;
553+ json . braillelabel = json . braille [ root ] [ 'braille-none' ] ;
553554 return json ;
554555}
555556
You can’t perform that action at this time.
0 commit comments