From c072acd94707524ea6ddd5b6c7f30e43b03e7948 Mon Sep 17 00:00:00 2001 From: Fazal Khan Date: Wed, 15 May 2024 13:30:57 +0100 Subject: [PATCH] fix(app): reduce func by 1 line for sonarcloud --- .../submit-additional-submission-options.service.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/services/return-requirements/submit-additional-submission-options.service.js b/app/services/return-requirements/submit-additional-submission-options.service.js index 1b30edf549..13ecebd101 100644 --- a/app/services/return-requirements/submit-additional-submission-options.service.js +++ b/app/services/return-requirements/submit-additional-submission-options.service.js @@ -27,8 +27,7 @@ const SessionModel = require('../../models/session.model.js') */ async function go (sessionId, payload, yar) { const session = await SessionModel.query().findById(sessionId) - const options = _ensureIsArray(payload['additional-submission-options']) - payload['additional-submission-options'] = options + const options = payload['additional-submission-options'] = _ensureIsArray(payload['additional-submission-options']) const validationResult = _validate(payload) if (!validationResult) {