mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-25 12:16:37 +00:00
Merge pull request #2373 from resin-io/fix-drive-blacklist
fix(gui): Fix error with empty drive blacklist
This commit is contained in:
commit
441069f04b
@ -58,14 +58,6 @@ const updateLock = require('./modules/update-lock')
|
|||||||
process.env.DRIVELIST_DEBUG = /drivelist|^\*$/i.test(process.env.DEBUG) ? '1' : ''
|
process.env.DRIVELIST_DEBUG = /drivelist|^\*$/i.test(process.env.DEBUG) ? '1' : ''
|
||||||
window.localStorage.debug = process.env.DEBUG
|
window.localStorage.debug = process.env.DEBUG
|
||||||
|
|
||||||
/**
|
|
||||||
* @summary Environment variable blacklisted drives by path
|
|
||||||
* @type {Array<String>}
|
|
||||||
* @constant
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
const BLACKLISTED_DRIVES = settings.get('driveBlacklist')
|
|
||||||
|
|
||||||
const app = angular.module('Etcher', [
|
const app = angular.module('Etcher', [
|
||||||
require('angular-ui-router'),
|
require('angular-ui-router'),
|
||||||
require('angular-ui-bootstrap'),
|
require('angular-ui-bootstrap'),
|
||||||
@ -216,6 +208,10 @@ app.run(() => {
|
|||||||
|
|
||||||
app.run(($timeout) => {
|
app.run(($timeout) => {
|
||||||
driveScanner.on('devices', (drives) => {
|
driveScanner.on('devices', (drives) => {
|
||||||
|
const BLACKLISTED_DRIVES = settings.has('driveBlacklist')
|
||||||
|
? settings.get('driveBlacklist').split(',')
|
||||||
|
: []
|
||||||
|
|
||||||
// Safely trigger a digest cycle.
|
// Safely trigger a digest cycle.
|
||||||
// In some cases, AngularJS doesn't acknowledge that the
|
// In some cases, AngularJS doesn't acknowledge that the
|
||||||
// available drives list has changed, and incorrectly
|
// available drives list has changed, and incorrectly
|
||||||
|
Loading…
x
Reference in New Issue
Block a user