Skip to content

Commit

Permalink
Update to release v5.0.7 fixes #1496
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Nov 17, 2019
1 parent 1ec4dee commit 4a656ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Change Log: `bootstrap-fileinput`

## version 5.0.7

**Date:** _under development_
**Date:** 17-Nov-2019

- (enh #1496): Correct isEmpty check for functions.
- (enh #1485): Update Portugese Brazilian Translations.
- (enh #1479): Methods updated:
- Include `addToStack` method.
- Remove `updateStack` method
Expand Down
5 changes: 2 additions & 3 deletions js/fileinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,11 @@
$modal.appendTo($body);
}
},
// https://stackoverflow.com/a/6000016
isFunction: function (v) {
return !!(v && v.constructor && v.call && v.apply);
return typeof v === 'function';
},
isEmpty: function (value, trim) {
return value === undefined || value === null || (!$h.isFunction(value) && ( value.length === 0 || (trim && $.trim(value) === '')));
return value === undefined || value === null || (!$h.isFunction(value) && (value.length === 0 || (trim && $.trim(value) === '')));
},
isArray: function (a) {
return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';
Expand Down
Loading

0 comments on commit 4a656ec

Please sign in to comment.