Skip to content

Commit 4a656ec

Browse files
committed
Update to release v5.0.7 fixes #1496
1 parent 1ec4dee commit 4a656ec

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CHANGE.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ Change Log: `bootstrap-fileinput`
33

44
## version 5.0.7
55

6-
**Date:** _under development_
6+
**Date:** 17-Nov-2019
77

8+
- (enh #1496): Correct isEmpty check for functions.
9+
- (enh #1485): Update Portugese Brazilian Translations.
810
- (enh #1479): Methods updated:
911
- Include `addToStack` method.
1012
- Remove `updateStack` method

js/fileinput.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,11 @@
211211
$modal.appendTo($body);
212212
}
213213
},
214-
// https://stackoverflow.com/a/6000016
215214
isFunction: function (v) {
216-
return !!(v && v.constructor && v.call && v.apply);
215+
return typeof v === 'function';
217216
},
218217
isEmpty: function (value, trim) {
219-
return value === undefined || value === null || (!$h.isFunction(value) && ( value.length === 0 || (trim && $.trim(value) === '')));
218+
return value === undefined || value === null || (!$h.isFunction(value) && (value.length === 0 || (trim && $.trim(value) === '')));
220219
},
221220
isArray: function (a) {
222221
return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';

0 commit comments

Comments
 (0)