We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e96e8f8 + 77632bf commit e528c3bCopy full SHA for e528c3b
lib/client/fileUpload.js
@@ -99,7 +99,13 @@ Template.afFileUpload.events({
99
});
100
101
const upload = template.collection.insert(opts, false);
102
- const ctx = AutoForm.getValidationContext(template.formId);
+ let ctx;
103
+ try {
104
+ ctx = AutoForm.getValidationContext(template.formId);
105
+ } catch (e) {
106
+ // Fix: "TypeError: Cannot read property '_resolvedSchema' of undefined"
107
+ ctx = AutoForm.getValidationContext();
108
+ }
109
110
upload.on('start', function () {
111
ctx.reset();
0 commit comments