From 81da9994ebf3b7d9422d4679831bd1e7eb5c1422 Mon Sep 17 00:00:00 2001 From: Divyaraj Masani Date: Thu, 24 Jun 2021 14:12:34 +0530 Subject: [PATCH] fix(class-newspack-blocks.php): fixes assets meta file path for scripts Due to incorrect assets path, view and editor scripts were loading fallback dependencies. This resulted in unnecessary scripts being added to the front end as well as wrong dependencies being added for editor scripts. fix #779 --- includes/class-newspack-blocks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-newspack-blocks.php b/includes/class-newspack-blocks.php index c61b01014..0d72fe394 100644 --- a/includes/class-newspack-blocks.php +++ b/includes/class-newspack-blocks.php @@ -33,7 +33,7 @@ public static function script_enqueue_helper( $script_path ) { } $path_info = pathinfo( $local_path ); - $asset_path = $path_info['dirname'] . '../' . $path_info['filename'] . '.asset.php'; + $asset_path = $path_info['dirname'] . '/' . $path_info['filename'] . '.asset.php'; $script_data = file_exists( $asset_path ) ? require $asset_path : array(