@@ -309,11 +309,13 @@ const DocumentEditor = (props: Props) => {
309309 // Move each selected page one slot to the left with its own operation.
310310 // A single backward `movePages` with `beforePageIndex` can diverge from
311311 // the expected result for multi-page selections.
312- const operations : DocumentOperation [ ] = sortedIndexes . map ( ( pageIndex ) => ( {
313- type : "movePages" ,
314- pageIndexes : [ pageIndex ] ,
315- beforePageIndex : pageIndex - 1 ,
316- } ) ) ;
312+ const operations : DocumentOperation [ ] = sortedIndexes . map (
313+ ( pageIndex ) => ( {
314+ type : "movePages" ,
315+ pageIndexes : [ pageIndex ] ,
316+ beforePageIndex : pageIndex - 1 ,
317+ } ) ,
318+ ) ;
317319
318320 setOperationQueue ( ( prev ) => [ ...prev , ...operations ] ) ;
319321 setIsUnsavedTagDismissed ( false ) ;
@@ -359,12 +361,12 @@ const DocumentEditor = (props: Props) => {
359361 } ) ;
360362
361363 const importOperation : DocumentOperations . ImportDocumentAfterOperation =
362- {
363- type : "importDocument" ,
364- afterPageIndex : afterIndex ,
365- document : copiedFile ,
366- treatImportedDocumentAsOnePage : true ,
367- } ;
364+ {
365+ type : "importDocument" ,
366+ afterPageIndex : afterIndex ,
367+ document : copiedFile ,
368+ treatImportedDocumentAsOnePage : true ,
369+ } ;
368370
369371 // Add a placeholder draft page for the imported document
370372 setDraftPages ( ( current ) => {
@@ -535,8 +537,7 @@ const DocumentEditor = (props: Props) => {
535537 // Don't allow removing every page — the document must keep at least one.
536538 const isRemoveDisabled =
537539 isOperationsDisabled ||
538- ( draftPages . length > 0 &&
539- selectedPageIndexes . length === draftPages . length ) ;
540+ ( draftPages . length > 0 && selectedPageIndexes . length === draftPages . length ) ;
540541 // Disable the move buttons when the selection is already at the edge.
541542 const canMoveLeft =
542543 selectedPageIndexes . length > 0 && ! selectedPageIndexes . includes ( 0 ) ;
0 commit comments