소스 검색

make the code more type safe

Yuki Takei 1 년 전
부모
커밋
0fec764427
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      apps/app/src/server/service/g2g-transfer.ts

+ 1 - 1
apps/app/src/server/service/g2g-transfer.ts

@@ -614,7 +614,7 @@ export class G2GTransferReceiverService implements Receiver {
       if (collectionName === 'configs' && options.mode !== ImportMode.flushAndInsert) {
       if (collectionName === 'configs' && options.mode !== ImportMode.flushAndInsert) {
         throw new Error('`flushAndInsert` is only available as an import setting for configs collection');
         throw new Error('`flushAndInsert` is only available as an import setting for configs collection');
       }
       }
-      if (collectionName === 'pages' && options.mode === 'insert') {
+      if (collectionName === 'pages' && options.mode === ImportMode.insert) {
         throw new Error('`insert` is not available as an import setting for pages collection');
         throw new Error('`insert` is not available as an import setting for pages collection');
       }
       }
       if (collectionName === 'attachmentFiles.chunks') {
       if (collectionName === 'attachmentFiles.chunks') {