Skip to content

Commit

Permalink
refactor: remove unnecessary wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 27, 2020
1 parent f0131e7 commit a512d99
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions public/src/modules/translator.js
Expand Up @@ -22,19 +22,7 @@
};
}

function loadServer(language, namespace) {
return new Promise(function (resolve, reject) {
languages.get(language, namespace, function (err, data) {
if (err) {
reject(err);
} else {
resolve(data);
}
});
});
}

module.exports = factory(require('../utils'), loadServer, warn);
module.exports = factory(require('../utils'), languages.get, warn);
}());
}
}(function (utils, load, warn) {
Expand Down

0 comments on commit a512d99

Please sign in to comment.