diff --git a/lib/plugins/archive.js b/lib/plugins/archive.js index 65c1bb79..f3d7c4c3 100644 --- a/lib/plugins/archive.js +++ b/lib/plugins/archive.js @@ -17,7 +17,7 @@ module.exports = class Archive { }) return data } catch (error) { - if (error.status === 404 && !this.getDesiredArchiveState()) { + if (error.status === 404) { return null } throw error @@ -59,13 +59,13 @@ module.exports = class Archive { shouldArchive (repository = this.repository) { const desiredState = this.getDesiredArchiveState() if (desiredState === null) return false - return !repository.archived && desiredState + return !repository?.archived && desiredState } shouldUnarchive (repository = this.repository) { const desiredState = this.getDesiredArchiveState() if (desiredState === null) return false - return repository.archived && !desiredState + return repository?.archived && !desiredState } isArchived () {