feat: remove deprecated hooks

This commit is contained in:
Barış Soner Uşaklı
2020-07-24 10:39:51 -04:00
parent 8c498fa1c9
commit 4eae927d14
6 changed files with 6 additions and 24 deletions

View File

@@ -26,10 +26,6 @@ function requireSharp() {
image.isFileTypeAllowed = async function (path) {
const plugins = require('./plugins');
// deprecated: remove in 1.14.0
if (plugins.hasListeners('filter:file.isFileTypeAllowed')) {
return await plugins.fireHook('filter:file.isFileTypeAllowed', path);
}
if (plugins.hasListeners('filter:image.isFileTypeAllowed')) {
return await plugins.fireHook('filter:image.isFileTypeAllowed', path);
}