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 Onboarding Flow GET Error #612

Merged
merged 7 commits into from
Sep 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update index.js
officiallygod committed Aug 27, 2024
commit be26c8d379109bd7859eabe30aff29d43a1d16de
17 changes: 11 additions & 6 deletions src/OnboardingSPA/index.js
Original file line number Diff line number Diff line change
@@ -49,12 +49,17 @@ export async function initializeNFDOnboarding( id, runtime ) {
);
}

const currentData = await getFlow();
if ( currentData.error === null ) {
currentData.body = initializeFlowData( currentData.body );
dispatch( nfdOnboardingStore ).setCurrentOnboardingData(
currentData.body
);
try {
const currentData = await getFlow();
if ( currentData.error === null ) {
currentData.body = initializeFlowData( currentData.body );
dispatch( nfdOnboardingStore ).setCurrentOnboardingData(
currentData.body
);
}
} catch ( error ) {
// eslint-disable-next-line no-console
console.error( 'Failed to retrieve flow data', error );
}

if ( null !== DOM_TARGET && 'undefined' !== typeof render ) {