Skip to content

Commit

Permalink
v1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen committed Dec 12, 2018
1 parent 180c025 commit a8e4099
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [1.2.1] - 2018-12-13
### Fixed
- `attachMetadata` helper.

## [1.2.0] - 2018-12-13
### Added
- `attachMetadata` can set extname, if it not setted.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@flexis/srcset",
"version": "1.2.0",
"version": "1.2.1",
"description": "Highly customizable lib to generating responsive images.",
"author": "dangreen",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/TrigenSoftware/flexis-srcset.git"
"url": "https://github.com/TrigenSoftware/flexis-srcset"
},
"bugs": {
"url": "https://github.com/TrigenSoftware/flexis-srcset/issues"
Expand Down
6 changes: 5 additions & 1 deletion src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export async function attachMetadata(source: Vinyl, force = false): Promise<ISrs
return source;
}

source.metadata = await Sharp(source.contents as Buffer).metadata();
try {
source.metadata = await Sharp(source.contents as Buffer).metadata();
} catch (err) {
return source;
}

if (!source.path) {
source.path = 'file';
Expand Down

0 comments on commit a8e4099

Please sign in to comment.