File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Node image generation module based on [sharp](https://github.com/lovell/sharp) a
1717
1818```
1919import presets from './presets';
20- import ImageCache from 'imagecache';
20+ import ImageCache from 'imagecache-sharp ';
2121
2222const imagecache = new ImageCache(presets);
2323
Original file line number Diff line number Diff line change @@ -23,9 +23,11 @@ module.exports = {
2323 return converted ;
2424 } ;
2525
26- app . actions . convertPosition = ( value , maxPosition , imageSize = 0 ) => {
26+ app . actions . convertPosition = ( value , maxPosition , imageSize ) => {
2727 let converted ;
2828
29+ imageSize = imageSize || 0 ;
30+
2931 if ( value === 'left' || value === 'top' ) {
3032 converted = 0 ;
3133 } else if ( value === 'center' ) {
Original file line number Diff line number Diff line change @@ -21,9 +21,11 @@ module.exports = {
2121 return converted ;
2222 } ;
2323
24- app . actions . convertPosition = ( value , maxPosition , imageSize = 0 ) => {
24+ app . actions . convertPosition = ( value , maxPosition , imageSize ) => {
2525 let converted ;
2626
27+ imageSize = imageSize || 0 ;
28+
2729 if ( value === 'left' || value === 'top' ) {
2830 converted = 0 ;
2931 } else if ( value === 'center' ) {
You can’t perform that action at this time.
0 commit comments