Skip to content

The function loadJSON(file, from) has a path problem in some cases. #2

Description

@itcook

In some cases like used in NW.js, Electron, when the webapp packaged into a desktop app, the function loadJSON(file, from) can't find the right file cause the path is i18n/ but not ./i18n/

fix it like:

return JSON.parse(fs.readFileSync('./' + path.join(from, file + '.json')));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions