diff --git a/frontend/src/data/script.js b/frontend/src/data/script.js index cb2573a6..1eff6b1e 100644 --- a/frontend/src/data/script.js +++ b/frontend/src/data/script.js @@ -126,7 +126,6 @@ export function getScript(doctype, view = 'Form') { return meta[doctype] } - setupHelperMethods(FormClass, document) const getDoc = () => document.doc if (isChildDoctype) { @@ -220,6 +219,9 @@ export function getScript(doctype, view = 'Form') { const FormClass = new Function(...helperKeys, wrappedScript)( ...helperValues, ) + + setupHelperMethods(FormClass) + return FormClass }