From 565e625e210bb8be20ba6beaf1805e3888e5b4c5 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Mon, 26 Nov 2018 21:42:57 +0100 Subject: [PATCH] Updated selection in UpdateSettings for external updaters. --- frontend/src/Settings/General/UpdateSettings.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/Settings/General/UpdateSettings.js b/frontend/src/Settings/General/UpdateSettings.js index 8ccf679c9..f5cd5af59 100644 --- a/frontend/src/Settings/General/UpdateSettings.js +++ b/frontend/src/Settings/General/UpdateSettings.js @@ -27,18 +27,21 @@ function UpdateSettings(props) { return null; } - const updateOptions = [ - { key: 'builtIn', value: 'Built-In' }, - { key: 'script', value: 'Script' } - ]; + const usingExternalUpdateMechanism = packageUpdateMechanism !== 'builtIn'; - if (packageUpdateMechanism !== 'builtIn') { + const updateOptions = []; + + if (usingExternalUpdateMechanism) { updateOptions.push({ key: packageUpdateMechanism, value: titleCase(packageUpdateMechanism) }); + } else { + updateOptions.push({ key: 'builtIn', value: 'Built-In' }); } + updateOptions.push({ key: 'script', value: 'Script' }); + return (