I am using the following logic to get the i18n string of the given key.
export function i18n(key) { if (entries.hasOwnProperty(key)) { return entries[k
For your specific case, the following examples shall work:
if(Object.prototype.hasOwnProperty.call(entries, "key")) { //rest of the code }
OR
if(Object.prototype.isPrototypeOf.call(entries, key)) { //rest of the code }
if({}.propertyIsEnumerable.call(entries, "key")) { //rest of the code }