Only accept non-empty strings in messages object

This commit is contained in:
James Lyne 2022-06-23 13:27:15 +01:00
parent 66fe07b17f
commit fb53bc2c2a

View File

@ -277,7 +277,7 @@ const _getMessages = (messageKeys: any, config: any = {}) => {
const messages: any = {};
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;