Skip to content

Commit 2171a2d

Browse files
committed
Fix: #41
1 parent f04039b commit 2171a2d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/client/fileUpload.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const defaultInsertOpts = {
1515
};
1616

1717
Template.afFileUpload.onCreated(function () {
18+
const self = this;
1819
if (!this.data) {
1920
this.data = {
2021
atts: {}
@@ -41,8 +42,8 @@ Template.afFileUpload.onCreated(function () {
4142
throw new Meteor.Error(404, '[meteor-autoform-files] No such collection "' + this.data.atts.collection + '"');
4243
}
4344

44-
this.collectionName = () => {
45-
return this.data.atts.collection;
45+
this.collectionName = function () {
46+
return self.data.atts.collection;
4647
};
4748

4849
this.currentUpload = new ReactiveVar(false);

0 commit comments

Comments
 (0)