File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,6 @@ const CLOUD_CONFIGS = [
2727 api_key : process . env . NUXT_CLOUDINARY_CLOUDINARY_API_KEY ,
2828 api_secret : process . env . NUXT_CLOUDINARY_CLOUDINARY_API_SECRET
2929 } ,
30- {
31- cloud_name : process . env . SPACEJELLY_TUTORIALS_CLOUDINARY_CLOUD_NAME ,
32- api_key : process . env . SPACEJELLY_TUTORIALS_CLOUDINARY_API_KEY ,
33- api_secret : process . env . SPACEJELLY_TUTORIALS_CLOUDINARY_API_SECRET
34- } ,
3530 {
3631 cloud_name : process . env . SVELTE_CLOUDINARY_CLOUDINARY_CLOUD_NAME ,
3732 api_key : process . env . SVELTE_CLOUDINARY_CLOUDINARY_API_KEY ,
@@ -47,7 +42,10 @@ const CLOUD_CONFIGS = [
4742 cloudinary . config ( config ) ;
4843
4944 const moderations = await getAllModerations ( ) ;
50- await deleteModerations ( moderations ) ;
45+
46+ if ( Array . isArray ( moderations ) ) {
47+ await deleteModerations ( moderations ) ;
48+ }
5149
5250 if ( Array . isArray ( config . directoriesToClear ) ) {
5351 await clearDirectoriesByPrefixes ( config . directoriesToClear ) ;
@@ -74,7 +72,7 @@ async function getAllModerations() {
7472
7573 return moderations . flat ( ) ;
7674 } catch ( e ) {
77- console . log ( `Failed to get all moderations: ${ e . message } ` ) ;
75+ console . log ( `Failed to get all moderations: ${ e . message || e . error ?. message } ` ) ;
7876 }
7977}
8078
You can’t perform that action at this time.
0 commit comments