mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 02:44:55 +00:00
useAPIErrorHandler: Improve type-safety of getPrefixedId()
This commit is contained in:
parent
7f11c8bbdf
commit
17f773ebd3
@ -6,7 +6,7 @@ export function getPrefixedId(message, callback) {
|
||||
// if a prefix function has been passed in it is used to
|
||||
// prefix the id, e.g. to allow an error message to be
|
||||
// set only for a localization namespace
|
||||
if (callback) {
|
||||
if (typeof callback === 'function') {
|
||||
return callback(prefixedMessage);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user