]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/core-utils/plugins/hooks.ts
Merge branch 'release/4.0.0' into develop
[github/Chocobozzz/PeerTube.git] / shared / core-utils / plugins / hooks.ts
index 3d59a7428d492901fd044b2a7bf1561dad24ef1f..92cb5ad68d0543ded523a79de2db51410445cbdd 100644 (file)
@@ -1,5 +1,5 @@
 import { HookType } from '../../models/plugins/hook-type.enum'
-import { isCatchable, isPromise } from '../miscs/miscs'
+import { isCatchable, isPromise } from '../common/promises'
 
 function getHookType (hookName: string) {
   if (hookName.startsWith('filter:')) return HookType.FILTER
@@ -29,7 +29,7 @@ async function internalRunHook <T> (handler: Function, hookType: HookType, resul
     }
 
     if (hookType === HookType.ACTION) {
-      if (isCatchable(p)) p.catch(err => onError(err))
+      if (isCatchable(p)) p.catch((err: any) => onError(err))
 
       return undefined
     }