mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix(core/formatter): handle null property when getting error message
This commit is contained in:
@@ -590,6 +590,11 @@ export abstract class BaseFormatter {
|
||||
error: `{unknown_${typeof property}_modifier(${lastModMatched})}`,
|
||||
};
|
||||
case 'object':
|
||||
if (property == null) {
|
||||
return {
|
||||
error: `{cannot_apply_modifier_to_null(${lastModMatched})}`,
|
||||
};
|
||||
}
|
||||
return { error: `{unknown_array_modifier(${lastModMatched})}` };
|
||||
default:
|
||||
return { error: `{unknown_modifier(${lastModMatched})}` };
|
||||
|
||||
Reference in New Issue
Block a user