Cache extension metadata
This commit is contained in:
parent
ea9d2dadf8
commit
2367cd574e
1 changed files with 6 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue