mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 05:06:40 +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 os = require('os')
|
||||||
const settings = require('../../../models/settings')
|
const settings = require('../../../models/settings')
|
||||||
|
const utils = require('../../../../../shared/utils')
|
||||||
|
const angular = require('angular')
|
||||||
|
|
||||||
/* eslint-disable lodash/prefer-lodash-method */
|
/* eslint-disable lodash/prefer-lodash-method */
|
||||||
|
|
||||||
@ -46,12 +48,12 @@ module.exports = function (
|
|||||||
* @example
|
* @example
|
||||||
* FileSelectorController.getFolderConstraint()
|
* FileSelectorController.getFolderConstraint()
|
||||||
*/
|
*/
|
||||||
this.getFolderConstraints = () => {
|
this.getFolderConstraints = utils.memoize(() => {
|
||||||
// TODO(Shou): get this dynamically from the mountpoint of a specific port in Etcher Pro
|
// TODO(Shou): get this dynamically from the mountpoint of a specific port in Etcher Pro
|
||||||
return settings.has('fileBrowserConstraintPath')
|
return settings.has('fileBrowserConstraintPath')
|
||||||
? settings.get('fileBrowserConstraintPath').split(',')
|
? settings.get('fileBrowserConstraintPath').split(',')
|
||||||
: []
|
: []
|
||||||
}
|
}, angular.equals)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @summary Get initial path
|
* @summary Get initial path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user