Skip to content

Commit

Permalink
Fix warning about rejected promise without an error
Browse files Browse the repository at this point in the history
Closes #81
  • Loading branch information
vvasilev- committed Feb 7, 2017
1 parent 78161c3 commit b11b6b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/group-by.md
Expand Up @@ -18,7 +18,7 @@ var opts = {
spritePath: './css/images/',
groupBy: function(image) {
if (image.url.indexOf('shapes') === -1) {
return Promise.reject();
return Promise.reject(new Error('Not a shape image.'));
}

return Promise.resolve('shapes');
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Expand Up @@ -110,7 +110,7 @@ export function prepareGroupBy(opts) {
return Promise.resolve(`@${image.ratio}x`);
}

return Promise.reject();
return Promise.reject(new Error('Not a retina image.'));
});
}

Expand Down

0 comments on commit b11b6b2

Please sign in to comment.