Make WordPress Core

Ticket #56470: remove_viewScript_constraint.diff

File remove_viewScript_constraint.diff, 529 bytes (added by lovor, 3 years ago)

patch file

  • src/wp-includes/class-wp-block.php

     
    263263                        wp_enqueue_script( $this->block_type->script );
    264264                }
    265265
    266                 if ( ! empty( $this->block_type->view_script ) && empty( $this->block_type->render_callback ) ) {
     266                if ( ! empty( $this->block_type->view_script ) ) {
    267267                        wp_enqueue_script( $this->block_type->view_script );
    268268                }
    269269