Skip to content

Commit d3944e7

Browse files
committed
fix issue with 'input' event
1 parent b264239 commit d3944e7

5 files changed

+12
-15
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 5.1.2
4+
5+
- Fix issue with 'input' event.
6+
7+
38
## 5.1.1
49

510
- Add `detached` method, the component now waits to be removed from the DOM, it then destroys the FilePond instance (the `destroyed` and `beforeDestroy` methods both run while the component is still in the DOM when using transitions).

dist/vue-filepond.esm.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-filepond v5.1.1
2+
* vue-filepond v5.1.2
33
* A handy FilePond adapter component for Vue
44
*
55
* Copyright (c) 2019 PQINA
@@ -135,11 +135,7 @@ export default (...plugins) => {
135135
// Map FilePond callback methods to Vue $emitters
136136
const options = events.reduce((obj, value) => {
137137
obj[value] = (...args) => {
138-
if(this._pond){
139-
this.$emit('input', this._pond.getFiles());
140-
}else{
141-
this.$emit('input', []);
142-
}
138+
this.$emit('input', this._pond ? this._pond.getFiles() : []);
143139
this.$emit(value.substr(2), ...args);
144140
};
145141
return obj;

dist/vue-filepond.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-filepond v5.1.1
2+
* vue-filepond v5.1.2
33
* A handy FilePond adapter component for Vue
44
*
55
* Copyright (c) 2019 PQINA
@@ -150,11 +150,7 @@
150150
args[_key] = arguments[_key];
151151
}
152152

153-
if (_this._pond) {
154-
_this.$emit('input', _this._pond.getFiles());
155-
} else {
156-
_this.$emit('input', []);
157-
}
153+
_this.$emit('input', _this._pond ? _this._pond.getFiles() : []);
158154
_this.$emit.apply(_this, [value.substr(2)].concat(args));
159155
};
160156
return obj;

dist/vue-filepond.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-filepond",
3-
"version": "5.1.1",
3+
"version": "5.1.2",
44
"description": "A handy FilePond adapter component for Vue",
55
"homepage": "https://pqina.nl/filepond",
66
"license": "MIT",

0 commit comments

Comments
 (0)