Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix notice dismiss JS dependency error #2557

Merged
merged 1 commit into from
Aug 8, 2023
Merged

Conversation

yscik
Copy link
Contributor

@yscik yscik commented Aug 7, 2023

Fixes #2556

Changes proposed in this Pull Request

  • Fixes a fatal JS error because the wp-dom-ready was not being loaded.

Testing instructions

  • Go to the Job Listings page (/wp-admin/edit.php?post_type=job_listing)
  • Check in the browser dev tools console that there is no TypeError in wpjm-notice-dismiss.js

@yscik yscik requested a review from a team August 7, 2023 15:12
@@ -130,7 +130,7 @@ public function admin_enqueue_scripts() {
);
}

WP_Job_manager::register_script( 'job_manager_notice_dismiss', 'js/admin/wpjm-notice-dismiss.js', [], true );
WP_Job_manager::register_script( 'job_manager_notice_dismiss', 'js/admin/wpjm-notice-dismiss.js', null, true );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The WP_Job_manager::register_script helper will load the dependencies from [name].assets.php generated the webpack script only if this argument is null. Supplying an empty array will instead override that dependency list.

@yscik yscik added this to the 1.42.0 milestone Aug 7, 2023
Copy link
Member

@mikeyarce mikeyarce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin conflict with Redux Framework
2 participants