Skip to content

Commit d950ed1

Browse files
committed
Add destroyEventHandlers()
1 parent 6f64c54 commit d950ed1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/assets/javascripts/jquery-fileupload/jquery.fileupload.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,8 @@
10801080
_handleFileTreeEntry: function (entry, path) {
10811081
var that = this,
10821082
dfd = $.Deferred(),
1083+
entries = [],
1084+
dirReader,
10831085
errorHandler = function (e) {
10841086
if (e && !e.entry) {
10851087
e.entry = entry;
@@ -1107,8 +1109,7 @@
11071109
readEntries();
11081110
}
11091111
}, errorHandler);
1110-
},
1111-
dirReader, entries = [];
1112+
};
11121113
path = path || '';
11131114
if (entry.isFile) {
11141115
if (entry._file) {
@@ -1311,6 +1312,10 @@
13111312
this._off(this.options.fileInput, 'change');
13121313
},
13131314

1315+
_destroy: function () {
1316+
this._destroyEventHandlers();
1317+
},
1318+
13141319
_setOption: function (key, value) {
13151320
var reinit = $.inArray(key, this._specialOptions) !== -1;
13161321
if (reinit) {

0 commit comments

Comments
 (0)