diff --git a/services/web/app/src/Features/History/HistoryController.mjs b/services/web/app/src/Features/History/HistoryController.mjs index 39d07137f0..2175b9114d 100644 --- a/services/web/app/src/Features/History/HistoryController.mjs +++ b/services/web/app/src/Features/History/HistoryController.mjs @@ -596,12 +596,11 @@ async function getChanges(req, res, next) { } function isPrematureClose(err) { - return ( err instanceof Error && 'code' in err && - (err.code === 'ERR_STREAM_PREMATURE_CLOSE' || - err.code === 'ERR_STREAM_UNABLE_TO_PIPE') + (err.code === 'ERR_STREAM_PREMATURE_CLOSE' || + err.code === 'ERR_STREAM_UNABLE_TO_PIPE') ) }