Fix plugin filter test

pull/5138/head
Chocobozzz 2022-07-13 11:26:00 +02:00
parent f7ce623db1
commit da5f46487f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
registerHook({
target: 'filter:api.user.signup.allowed.result',
handler: (result, params) => {
if (params && params.body.email.includes('jma')) {
if (params && params.body && params.body.email && params.body.email.includes('jma')) {
return { allowed: false, errorMessage: 'No jma' }
}