Skip to content

Commit

Permalink
Merge pull request #220 from xwp/fix/workbox-5-plugin-references
Browse files Browse the repository at this point in the history
Prefix Workbox 'Plugin' classes with the module name after renamed in v5
  • Loading branch information
westonruter authored Aug 23, 2019
2 parents 4c8f2bc + 85a1dd0 commit cd2b132
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ public static function prepare_strategy_args_for_js_export( $strategy_args ) {
_doing_it_wrong( 'WP_Service_Workers::register_cached_route', esc_html( sprintf( __( 'Unrecognized plugin: %s', 'pwa' ), $plugin_name ) ), '0.2' );
} else {
$plugins_js[] = sprintf(
'new wp.serviceWorker[ %s ].Plugin( %s )',
'new wp.serviceWorker[ %s ][ %s ]( %s )',
wp_service_worker_json_encode( $plugin_name ),
wp_service_worker_json_encode( ucfirst( $plugin_name ) . 'Plugin' ),
empty( $plugin_args ) ? '{}' : wp_service_worker_json_encode( $plugin_args )
);
}
Expand Down

0 comments on commit cd2b132

Please # to comment.