@@ -38,7 +38,6 @@ export const Error = {
38
38
}
39
39
40
40
function isRecognizedDevice ( slotCount , partitions ) {
41
-
42
41
if ( slotCount !== 2 ) {
43
42
console . error ( '[QDL] Unrecognised device (slotCount)' )
44
43
return false
@@ -91,6 +90,7 @@ export function useQdl() {
91
90
function setError ( error ) {
92
91
_setError ( error )
93
92
}
93
+
94
94
useEffect ( ( ) => {
95
95
setProgress ( - 1 )
96
96
setMessage ( )
@@ -186,7 +186,7 @@ export function useQdl() {
186
186
. catch ( ( err ) => {
187
187
console . error ( '[QDL] Connection error' , err )
188
188
setStep ( Step . READY )
189
- } )
189
+ } )
190
190
break
191
191
}
192
192
@@ -242,15 +242,15 @@ export function useQdl() {
242
242
setProgress ( 0 )
243
243
244
244
async function flashDevice ( ) {
245
- const currentSlot = await qdl . current . getActiveSlot ( ) ;
245
+ const currentSlot = await qdl . current . getActiveSlot ( )
246
246
if ( ! [ 'a' , 'b' ] . includes ( currentSlot ) ) {
247
247
throw `Unknown current slot ${ currentSlot } `
248
248
}
249
249
const otherSlot = currentSlot === 'a' ? 'b' : 'a'
250
250
251
251
// Erase current xbl partition so if users try to power up device
252
252
// with corrupted primary gpt header, it would not update the backup
253
- await qdl . current . erase ( "xbl" + `_ ${ currentSlot } `)
253
+ await qdl . current . erase ( `xbl_ ${ currentSlot } `)
254
254
255
255
for await ( const [ image , onProgress ] of withProgress ( manifest . current , setProgress ) ) {
256
256
const fileHandle = await imageWorker . current . getImage ( image )
0 commit comments