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

fix: markRaw pesa factory, case private

This commit is contained in:
18alantom 2022-02-10 12:25:19 +05:30
parent 2f6a2f4cc2
commit 1ff861ee56

View File

@ -6,6 +6,7 @@ const {
DEFAULT_INTERNAL_PRECISION, DEFAULT_INTERNAL_PRECISION,
DEFAULT_DISPLAY_PRECISION, DEFAULT_DISPLAY_PRECISION,
} = require('./utils/consts'); } = require('./utils/consts');
const { markRaw } = require('vue');
module.exports = { module.exports = {
initializeAndRegister(customModels = {}, force = false) { initializeAndRegister(customModels = {}, force = false) {
@ -55,7 +56,9 @@ module.exports = {
display = parseInt(display); display = parseInt(display);
} }
this.pesa = getMoneyMaker({ currency, precision, display }); const moneyMaker = getMoneyMaker({ currency, precision, display });
// Pesa uses private fields, Vue does deep conversions to Proxy, ∴
this.pesa = (...args) => markRaw(moneyMaker(...args));
}, },
init(force) { init(force) {