File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -686,8 +686,21 @@ Blockly.Blocks['operators_expandablejoininputs'] = {
686686 fillInBlock : function ( connection , index ) {
687687 if ( connection . sourceBlock_ . isInsertionMarker_ ) return ;
688688 const block = this . workspace . newBlock ( 'text' ) ;
689- const text = this . messageList [ index ] ;
690- block . setFieldValue ( text ? text : "..." , "TEXT" ) ;
689+
690+ let textValue = this . messageList [ index ] ;
691+ const editingTarget = window . vm . editingTarget ;
692+ if ( editingTarget ) {
693+ const vmBlock = editingTarget . blocks . getBlock ( this . id ) ;
694+ if ( vmBlock ) {
695+ const input = vmBlock . inputs [ `INPUT${ index + 1 } ` ] ;
696+ if ( input ) {
697+ const inpuBlock = editingTarget . blocks . getBlock ( input . block ) ;
698+ if ( inpuBlock ) textValue = inpuBlock . fields . TEXT . value ;
699+ }
700+ }
701+ }
702+
703+ block . setFieldValue ( textValue !== undefined ? textValue : "..." , "TEXT" ) ;
691704 block . setShadow ( true ) ;
692705 block . initSvg ( ) ;
693706 block . render ( false ) ;
You can’t perform that action at this time.
0 commit comments