fix: moved setupHelperMethods from setupFormController to evaluateFormClass

(cherry picked from commit 875431a620027de9a5d30fc6ab0d12047c09b82b)
This commit is contained in:
Shariq Ansari 2025-05-26 16:57:02 +05:30 committed by Mergify
parent d820ff1572
commit c583e8044b

View File

@ -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
}