2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 23:00:56 +00:00

fix: shift t, T to prevent module errors

This commit is contained in:
18alantom 2022-01-24 11:41:09 +05:30
parent 54f579519c
commit 31f2db495e
2 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,5 @@
const Observable = require('./utils/observable');
const { T, t } = require('./utils/translation');
const utils = require('./utils');
const { getMoneyMaker } = require('pesa');
const {
@ -227,8 +228,10 @@ module.exports = {
return this.metaCache[doctype];
},
async getDoc(doctype, name, options = {skipDocumentCache: false}) {
let doc = options.skipDocumentCache ? null : this.getDocFromCache(doctype, name);
async getDoc(doctype, name, options = { skipDocumentCache: false }) {
let doc = options.skipDocumentCache
? null
: this.getDocFromCache(doctype, name);
if (!doc) {
doc = new (this.getDocumentClass(doctype))({
doctype: doctype,
@ -369,4 +372,6 @@ module.exports = {
this.server.close();
}
},
t,
T,
};

View File

@ -1,5 +1,5 @@
const { pesa } = require('pesa');
const { T, t } = require('./translation');
const { t } = require('./translation');
Array.prototype.equals = function (array) {
return (
@ -89,8 +89,6 @@ function isPesa(value) {
module.exports = {
_: t,
t,
T,
slug,
getRandomString,
sleep,