Skip to content

Commit

Permalink
Scan notices: fix the location of the enqueued js files (#35648)
Browse files Browse the repository at this point in the history
This fixes an issue introduced in #34072.

- The non-minified file (accessible when `SCRIPT_DEBUG` is set to true) should load from inside the modules directory.
- The minified file should load from _inc/build, located at the root of the Jetpack plugin.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/7961794173
  • Loading branch information
jeherve authored and matticbot committed Feb 19, 2024
1 parent c8f84ee commit 8426933
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This is an alpha version! The changes listed here are not final.
### Bug fixes
- Jetpack Google Fonts: Fix some Google fonts aren't displayed correctly on front end
- Like block: Encode Avatar URLs
- Scan: ensure the Admin notice resources are always properly loaded.

### Other changes <!-- Non-user-facing changes go here. This section will not be copied to readme.txt. -->
- Add caching for user invites
Expand Down
4 changes: 2 additions & 2 deletions modules/scan/class-admin-bar-notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ public function enqueue_toolbar_script() {
Assets::register_script(
self::SCRIPT_NAME,
'_inc/build/scan/admin-bar-notice.min.js',
__FILE__,
JETPACK__PLUGIN_FILE,
array(
'in_footer' => true,
'strategy' => 'defer',
'nonmin_path' => '_inc/build/scan/admin-bar-notice.js',
'nonmin_path' => 'modules/scan/admin-bar-notice.js',
'dependencies' => array( 'admin-bar' ),
'version' => self::SCRIPT_VERSION,
'enqueue' => true,
Expand Down

0 comments on commit 8426933

Please sign in to comment.