remove a redundant null-check

customProps is not nullable.
This commit is contained in:
Dmitry Muhomor 2023-03-17 20:47:42 +02:00 committed by Daniel Micay
parent edb039e127
commit c5a7db6c85

View file

@ -162,11 +162,8 @@ export async function extractProps(config: DeviceConfig, customState: SystemStat
let fingerprint = stockProps.get('system')!.get('ro.system.build.fingerprint')!
// Diff
let missingProps: PartitionProps | undefined
if (customProps != null) {
let propChanges = diffPartitionProps(stockProps, customProps)
missingProps = new Map(Array.from(propChanges.entries()).map(([part, props]) => [part, props.removed]))
}
let propChanges = diffPartitionProps(stockProps, customProps)
let missingProps: PartitionProps = new Map(Array.from(propChanges.entries()).map(([part, props]) => [part, props.removed]))
// A/B OTA partitions
let stockOtaParts = stockProps.get('product')!.get('ro.product.ab_ota_partitions')!.split(',')