fix(core/formatter): handle null property when getting error message

This commit is contained in:
Viren070
2025-11-10 14:41:07 +00:00
parent 5b16957411
commit 32bbbd4bbc
+5
View File
@@ -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})}` };