Skip to content

Commit

Permalink
Merge pull request #812 from Automattic/fix/import-status
Browse files Browse the repository at this point in the history
Retrieve the status and steps regardless of the site type.
  • Loading branch information
dchymko authored Aug 2, 2021
2 parents 823b7e4 + 7fc429e commit bfdc00b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/lib/site-import/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,12 @@ ${ maybeExitPrompt }

importJob.progress = { status: jobStatus, steps: jobSteps };
}
} else {
if ( ! importJob ) {
return resolve( 'No import job found' );
}

( {
progress: { status: jobStatus, steps: jobSteps },
} = importJob );
} else if ( ! importJob ) {
return resolve( 'No import job found' );
}

jobStatus = importJob.progress.status;
jobSteps = importJob.progress.steps;
createdAt = importJob.createdAt;
completedAt = importJob.completedAt;

Expand Down

0 comments on commit bfdc00b

Please sign in to comment.