@@ -683,23 +683,20 @@ function build_element_attribute_update_assignment(
683683 * @param {Identifier } node_id
684684 * @param {AST.Attribute } attribute
685685 * @param {ComponentContext } context
686- * @returns {boolean }
687686 */
688687function build_custom_element_attribute_update_assignment ( node_id , attribute , context ) {
689688 const state = context . state ;
690689 const name = attribute . name ; // don't lowercase, as we set the element's property, which might be case sensitive
691690 let { value, has_state } = build_attribute_value ( attribute . value , context ) ;
692691
693- const update = b . stmt ( b . call ( '$.set_custom_element_data' , node_id , b . literal ( name ) , value ) ) ;
692+ const call = b . call ( '$.set_custom_element_data' , node_id , b . literal ( name ) , value ) ;
694693
695694 if ( has_state ) {
696695 // this is different from other updates — it doesn't get grouped,
697696 // because set_custom_element_data may not be idempotent
698- state . init . push ( b . stmt ( b . call ( '$.template_effect' , b . thunk ( update . expression ) ) ) ) ;
699- return true ;
697+ state . init . push ( b . stmt ( b . call ( '$.template_effect' , b . thunk ( call ) ) ) ) ;
700698 } else {
701- state . init . push ( update ) ;
702- return false ;
699+ state . init . push ( b . stmt ( call ) ) ;
703700 }
704701}
705702
@@ -711,7 +708,6 @@ function build_custom_element_attribute_update_assignment(node_id, attribute, co
711708 * @param {Identifier } node_id
712709 * @param {AST.Attribute } attribute
713710 * @param {ComponentContext } context
714- * @returns {boolean }
715711 */
716712function build_element_special_value_attribute ( element , node_id , attribute , context ) {
717713 const state = context . state ;
@@ -768,9 +764,7 @@ function build_element_special_value_attribute(element, node_id, attribute, cont
768764 value ,
769765 update
770766 ) ;
771- return true ;
772767 } else {
773768 state . init . push ( update ) ;
774- return false ;
775769 }
776770}
0 commit comments