Fix error with loading lang file from packaged app.

This commit is contained in:
Daniel Scalzi 2019-04-23 16:53:32 -04:00
parent c141475404
commit 887bb67ab0
No known key found for this signature in database
GPG Key ID: D18EA3FB4B142A57

View File

@ -4,7 +4,7 @@ const path = require('path')
let lang let lang
exports.loadLanguage = function(id){ exports.loadLanguage = function(id){
lang = JSON.parse(fs.readFileSync(path.resolve('app', 'assets', 'lang', `${id}.json`))) || {} lang = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'lang', `${id}.json`))) || {}
} }
exports.query = function(id){ exports.query = function(id){