This commit is contained in:
syuilo 2017-12-11 14:19:51 +09:00
parent b83fc7989c
commit 82ab9c5d1c
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@
<script>
this.image = this.opts.image;
this.styles = {
'background-color': `rgb(${this.image.properties.average_color.join(',')})`,
'background-color': this.image.properties.average_color ? `rgb(${this.image.properties.average_color.join(',')})` : 'transparent',
'background-image': `url(${this.image.url}?thumbnail&size=512)`
};
console.log(this.styles);

View File

@ -75,7 +75,7 @@
<script>
this.image = this.opts.image;
this.styles = {
'background-color': `rgb(${this.image.properties.average_color.join(',')})`,
'background-color': this.image.properties.average_color ? `rgb(${this.image.properties.average_color.join(',')})` : 'transparent',
'background-image': `url(${this.image.url}?thumbnail&size=512)`
};
</script>