diff --git a/lib/renderer/extensions/i18n.js b/lib/renderer/extensions/i18n.js index 5085365c7beb..d6362e3954f2 100644 --- a/lib/renderer/extensions/i18n.js +++ b/lib/renderer/extensions/i18n.js @@ -8,9 +8,13 @@ const {ipcRenderer} = require('electron') const fs = require('fs') const path = require('path') +let metadata + const getExtensionMetadata = () => { - // FIXME(kevinsawicki) Either cache this or don't use sync IPC to obtain it - return ipcRenderer.sendSync('CHROME_I18N_MANIFEST', chrome.runtime.id) + if (!metadata) { + metadata = ipcRenderer.sendSync('CHROME_I18N_MANIFEST', chrome.runtime.id) + } + return metadata } const getMessagesPath = (language) => {