diff --git a/src/client/includes/lookup.ts b/src/client/includes/lookup.ts index 47b1c5a..130ced2 100644 --- a/src/client/includes/lookup.ts +++ b/src/client/includes/lookup.ts @@ -8,6 +8,7 @@ import { getGenericLocaleFrom } from './utils' const lookupCache: Record> = {} const addToCache = (path: string, locale: string, message: string) => { + if (!message) return message if (!(locale in lookupCache)) lookupCache[locale] = {} if (!(path in lookupCache[locale])) lookupCache[locale][path] = message return message