Explorar o código

fix getS3Bucket

Yuki Takei hai 1 ano
pai
achega
c3dd9fbff1
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      apps/app/src/server/service/file-uploader/aws.ts

+ 2 - 2
apps/app/src/server/service/file-uploader/aws.ts

@@ -48,8 +48,8 @@ const isFileExists = async(s3: S3Client, params: HeadObjectCommandInput) => {
   return true;
 };
 
-const getS3Bucket = (): string => {
-  return configManager.getConfig('crowi', 'aws:s3Bucket');
+const getS3Bucket = (): string | undefined => {
+  return configManager.getConfig('crowi', 'aws:s3Bucket') ?? undefined; // return undefined when getConfig() returns null
 };
 
 const S3Factory = (): S3Client => {