Fix loading driveBlacklist settings

Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-01-31 15:20:43 +01:00
parent c09237f0c3
commit 990dcc9d5a

View File

@ -153,9 +153,7 @@ const COMPUTE_MODULE_DESCRIPTIONS: _.Dictionary<string> = {
[USB_PRODUCT_ID_BCM2710_BOOT]: 'Compute Module 3',
};
const BLACKLISTED_DRIVES = settings.has('driveBlacklist')
? settings.get('driveBlacklist').split(',')
: [];
let BLACKLISTED_DRIVES: string[] = [];
function driveIsAllowed(drive: {
devicePath: string;
@ -342,6 +340,7 @@ async function main(): Promise<void> {
} catch (error) {
exceptionReporter.report(error);
}
BLACKLISTED_DRIVES = settings.get('driveBlacklist') || [];
ReactDOM.render(
React.createElement(MainPage),
document.getElementById('main'),