woocommerce/plugins/woocommerce-admin/client/core-profiler/pages
Elio Rivero 1c23c5f2b4
Core profiler: set default for props to avoid crashes (#49519)
* fix(core-profiler): set default for props to avoid crashes. Fixes #49512

This fix solves an issue where if some of the onboarding profile properties from the context are undefined, it will prevent the user from proceeding with the core profiler. 

Related issue #49512 has a description of the issue.

* Add changefile(s) from automation for the following project(s): woocommerce

* feat(core-profiler): improve onboarding profile assignment logic

This commit improves the logic for assigning the onboarding profile in the core profiler. It now checks if the output of the event is an object before assigning it to the context. If the output is not an object, it keeps the existing context. This prevents crashes and allows the user to proceed with the core profiler.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2024-07-23 10:45:58 +08:00
..
tests lint 2023-11-21 18:08:00 +07:00
BusinessInfo.tsx Core profiler: set default for props to avoid crashes (#49519) 2024-07-23 10:45:58 +08:00
BusinessLocation.tsx dev: core profiler xstate v5 migration (#48135) 2024-06-07 15:06:40 +08:00
IntroOptIn.tsx dev: core profiler xstate v5 migration (#48135) 2024-06-07 15:06:40 +08:00
Plugins.tsx dev: core profiler xstate v5 migration (#48135) 2024-06-07 15:06:40 +08:00
UserProfile.tsx dev: core profiler xstate v5 migration (#48135) 2024-06-07 15:06:40 +08:00