If we have app.error we always have an app.error.details object
This commit is contained in:
@@ -1320,7 +1320,7 @@ function checkAppState(app, state) {
|
||||
|
||||
if (app.installationState === exports.ISTATE_ERROR) {
|
||||
// allow task to be called again if that was the errored task
|
||||
if (app.error.details?.installationState === state) return null;
|
||||
if (app.error.details.installationState === state) return null;
|
||||
|
||||
// allow uninstall from any state
|
||||
if (state !== exports.ISTATE_PENDING_UNINSTALL && state !== exports.ISTATE_PENDING_RESTORE && state !== exports.ISTATE_PENDING_IMPORT) return new BoxError(BoxError.BAD_STATE, 'Not allowed in error state');
|
||||
@@ -2246,7 +2246,7 @@ async function repair(app, data, auditSource) {
|
||||
assert.strictEqual(typeof auditSource, 'object');
|
||||
|
||||
const appId = app.id;
|
||||
let errorState = (app.error && app.error.details?.installationState) || exports.ISTATE_PENDING_CONFIGURE;
|
||||
let errorState = (app.error && app.error.details.installationState) || exports.ISTATE_PENDING_CONFIGURE;
|
||||
|
||||
const task = {
|
||||
args: {},
|
||||
|
||||
Reference in New Issue
Block a user