mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 11:16:39 +00:00
fix(gui): Allow undefined eta
Change-type: patch Signed-off-by: Alexis Svinartchouk <alexis@resin.io>
This commit is contained in:
parent
a237bfd930
commit
aaccd10c2a
@ -251,18 +251,16 @@ const storeReducer = (state = DEFAULT_STATE, action) => {
|
||||
})
|
||||
}
|
||||
|
||||
if (!_.isUndefined(action.data.percentage)) {
|
||||
if (!utils.isValidPercentage(action.data.percentage)) {
|
||||
throw errors.createError({
|
||||
title: `Invalid state percentage: ${action.data.percentage}`
|
||||
})
|
||||
}
|
||||
if (!_.isUndefined(action.data.percentage) && !utils.isValidPercentage(action.data.percentage)) {
|
||||
throw errors.createError({
|
||||
title: `Invalid state percentage: ${action.data.percentage}`
|
||||
})
|
||||
}
|
||||
|
||||
if (!_.isNumber(action.data.eta)) {
|
||||
throw errors.createError({
|
||||
title: `Invalid state eta: ${action.data.eta}`
|
||||
})
|
||||
}
|
||||
if (!_.isUndefined(action.data.eta) && !_.isNumber(action.data.eta)) {
|
||||
throw errors.createError({
|
||||
title: `Invalid state eta: ${action.data.eta}`
|
||||
})
|
||||
}
|
||||
|
||||
return state.set('flashState', Immutable.fromJS(action.data))
|
||||
|
Loading…
x
Reference in New Issue
Block a user