Skip to content

Commit

Permalink
Bumped version to 4.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiospampinato committed Sep 6, 2019
1 parent 406bd3d commit 11ea082
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Version 4.1.5
- $.fn.val: ensuring it works with “input[type=file][multiple]” elements
- Migration guide: mentioning how $.fn.data stores values

### Version 4.1.4
- $.fn.get: improved types
- TypeScript: made types a little more forgiving
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ If you're migrating from jQuery be sure to read our [migration guide](https://gi

## Usage

Get Cash from [CloudFlare](https://cdnjs.cloudflare.com/ajax/libs/cash/4.1.4/cash.min.js) or [jsDelivr](https://cdn.jsdelivr.net/npm/[email protected].4/dist/cash.min.js) and use it like this:
Get Cash from [CloudFlare](https://cdnjs.cloudflare.com/ajax/libs/cash/4.1.5/cash.min.js) or [jsDelivr](https://cdn.jsdelivr.net/npm/[email protected].5/dist/cash.min.js) and use it like this:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/cash/4.1.4/cash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cash/4.1.5/cash.min.js"></script>
<script>
$(function () {
$('html').addClass ( 'dom-loaded' );
Expand Down
2 changes: 1 addition & 1 deletion dist/cash.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ Cash.prototype.trigger = function (eventFullName, data) {
// @require core/pluck.ts
// @require core/variables.ts
function getValue(ele) {
if (ele.multiple)
if (ele.multiple && ele.options)
return pluck(filter.call(ele.options, option => option.selected && !option.disabled && !option.parentNode.disabled), 'value');
return ele.value || '';
}
Expand Down
2 changes: 1 addition & 1 deletion dist/cash.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ Cash.prototype.trigger = function (eventFullName, data) {


function getValue(ele) {
if (ele.multiple) return pluck(filter.call(ele.options, function (option) {
if (ele.multiple && ele.options) return pluck(filter.call(ele.options, function (option) {
return option.selected && !option.disabled && !option.parentNode.disabled;
}), 'value');
return ele.value || '';
Expand Down
2 changes: 1 addition & 1 deletion dist/cash.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ Cash.prototype.trigger = function ( this: Cash, eventFullName: Event | string, d

function getValue ( ele: Ele ): string | string[] {

if ( ele.multiple ) return pluck ( filter.call ( ele.options, option => option.selected && !option.disabled && !option.parentNode.disabled ), 'value' );
if ( ele.multiple && ele.options ) return pluck ( filter.call ( ele.options, option => option.selected && !option.disabled && !option.parentNode.disabled ), 'value' );

return ele.value || '';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cash-dom",
"description": "An absurdly small jQuery alternative for modern browsers.",
"version": "4.1.4",
"version": "4.1.5",
"license": "MIT",
"browser": "./dist/cash.js",
"main": "./dist/cash.js",
Expand Down

0 comments on commit 11ea082

Please sign in to comment.