mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
fix(gui): Fix an inifinite digest loop trigger
This fixes a guard against infinite digest loop triggering that was erronously dropped during a rebase. Change-Type: patch
This commit is contained in:
parent
e8fa7d8812
commit
fffdeb1320
@ -18,6 +18,8 @@
|
||||
|
||||
const os = require('os')
|
||||
const settings = require('../../../models/settings')
|
||||
const utils = require('../../../../../shared/utils')
|
||||
const angular = require('angular')
|
||||
|
||||
/* eslint-disable lodash/prefer-lodash-method */
|
||||
|
||||
@ -46,12 +48,12 @@ module.exports = function (
|
||||
* @example
|
||||
* FileSelectorController.getFolderConstraint()
|
||||
*/
|
||||
this.getFolderConstraints = () => {
|
||||
this.getFolderConstraints = utils.memoize(() => {
|
||||
// TODO(Shou): get this dynamically from the mountpoint of a specific port in Etcher Pro
|
||||
return settings.has('fileBrowserConstraintPath')
|
||||
? settings.get('fileBrowserConstraintPath').split(',')
|
||||
: []
|
||||
}
|
||||
}, angular.equals)
|
||||
|
||||
/**
|
||||
* @summary Get initial path
|
||||
|
Loading…
x
Reference in New Issue
Block a user