Only accept non-empty strings in messages object
This commit is contained in:
parent
66fe07b17f
commit
fb53bc2c2a
@ -277,7 +277,7 @@ const _getMessages = (messageKeys: any, config: any = {}) => {
|
|||||||
const messages: any = {};
|
const messages: any = {};
|
||||||
|
|
||||||
for(const key of messageKeys) {
|
for(const key of messageKeys) {
|
||||||
messages[key] = config[key] || `Missing message: ${key}`;
|
messages[key] = typeof config[key] === 'string' && config[key] ? config[key] : `Missing message: ${key}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return messages as LiveAtlasGlobalMessageConfig;
|
return messages as LiveAtlasGlobalMessageConfig;
|
||||||
|
Loading…
Reference in New Issue
Block a user