diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-12-11 14:19:51 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-12-11 14:19:51 +0900 |
| commit | 82ab9c5d1c8d2cc66978633ecefd14adf1de877a (patch) | |
| tree | 8fd66c45ea509bcdbc746f1a65ddadeeacd4caea /src/web | |
| parent | :v: (diff) | |
| download | sharkey-82ab9c5d1c8d2cc66978633ecefd14adf1de877a.tar.gz sharkey-82ab9c5d1c8d2cc66978633ecefd14adf1de877a.tar.bz2 sharkey-82ab9c5d1c8d2cc66978633ecefd14adf1de877a.zip | |
Fix bug
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app/desktop/tags/images.tag | 2 | ||||
| -rw-r--r-- | src/web/app/mobile/tags/images.tag | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/web/app/desktop/tags/images.tag b/src/web/app/desktop/tags/images.tag index 5e4be481dc..eeaf4cd3d2 100644 --- a/src/web/app/desktop/tags/images.tag +++ b/src/web/app/desktop/tags/images.tag @@ -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); diff --git a/src/web/app/mobile/tags/images.tag b/src/web/app/mobile/tags/images.tag index b200eefe7e..5899364aef 100644 --- a/src/web/app/mobile/tags/images.tag +++ b/src/web/app/mobile/tags/images.tag @@ -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> |