Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
fixes #22 filtered files now replace themselves in the list. reassign…
Browse files Browse the repository at this point in the history
…s index to use the file name
  • Loading branch information
cdowdy committed Dec 22, 2017
1 parent 7d46c79 commit 39400b8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"presets": [
["env", {
"targets": {
"browsers": ["last 2 versions", "safari >= 7", "ie >= 11"]
"browsers": ["last 2 versions", "safari >= 7", "ie >= 10"]
},
"modules": false
}]
Expand Down
4 changes: 4 additions & 0 deletions assets/js/components/TinypngFilelisting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@
response.data.forEach(object => {
if (this.filteredFiles) {
let index = this.fileList.map(item => item.imagePath).indexOf(file);
}
this.fileList.splice(index, 1, {
filename: object.filename,
filesize: object.optimizedSize,
Expand All @@ -316,6 +319,7 @@
imagePath: object.imagePath,
located: object.located,
});
});
this.$emit('tinypng-image-optimized', response.data);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"webpack": "^3.6.0"
},
"browserslist ": [
"ie 11",
"ie 10",
"ChromeAndroid >= 4.4.4",
"Chrome",
"Firefox"
Expand Down
2 changes: 1 addition & 1 deletion web/tinypng.optimize.js

Large diffs are not rendered by default.

0 comments on commit 39400b8

Please sign in to comment.