Skip to content

Commit 7adf4a3

Browse files
committed
Fix: veliovgroup/Meteor-Files#263 and partial fixes #5
1 parent e96e8f8 commit 7adf4a3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/client/fileUpload.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,13 @@ Template.afFileUpload.events({
9999
});
100100

101101
const upload = template.collection.insert(opts, false);
102-
const ctx = AutoForm.getValidationContext(template.formId);
102+
let ctx;
103+
try {
104+
ctx = AutoForm.getValidationContext(template.formId)
105+
} catch {
106+
// Fix: "TypeError: Cannot read property '_resolvedSchema' of undefined"
107+
ctx = AutoForm.getValidationContext();
108+
}
103109

104110
upload.on('start', function () {
105111
ctx.reset();

0 commit comments

Comments
 (0)