File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ Template.afFileUpload.onCreated(function () {
7070 this . currentUpload = new ReactiveVar ( false ) ;
7171 this . inputName = this . data . name ;
7272 this . fileId = new ReactiveVar ( this . data . value || false ) ;
73- this . formId = this . data . atts . id ;
73+ this . formId = AutoForm . getFormId ( ) ;
7474 return ;
7575} ) ;
7676
@@ -148,7 +148,7 @@ Template.afFileUpload.events({
148148 const upload = template . collection . insert ( opts , false ) ;
149149 let ctx ;
150150 try {
151- ctx = AutoForm . getValidationContext ( $ ( e . target ) . closest ( "form" ) . attr ( 'id' ) ) ;
151+ ctx = AutoForm . getValidationContext ( template . formId ) ;
152152 } catch ( exception ) {
153153 // Fix: "TypeError: Cannot read property '_resolvedSchema' of undefined"
154154 ctx = AutoForm . getValidationContext ( ) ;
You can’t perform that action at this time.
0 commit comments