mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-23 16:44:04 -05:00
Fix typo causing incorrect error being raised in blurhash processing failure (#32104)
This commit is contained in:
parent
db332553c9
commit
886baa5e35
@ -7,7 +7,7 @@ module Paperclip
|
|||||||
|
|
||||||
width, height, data = blurhash_params
|
width, height, data = blurhash_params
|
||||||
# Guard against segfaults if data has unexpected size
|
# Guard against segfaults if data has unexpected size
|
||||||
raise RangeError("Invalid image data size (expected #{width * height * 3}, got #{data.size})") if data.size != width * height * 3 # TODO: should probably be another exception type
|
raise RangeError, "Invalid image data size (expected #{width * height * 3}, got #{data.size})" if data.size != width * height * 3 # TODO: should probably be another exception type
|
||||||
|
|
||||||
attachment.instance.blurhash = Blurhash.encode(width, height, data, **(options[:blurhash] || {}))
|
attachment.instance.blurhash = Blurhash.encode(width, height, data, **(options[:blurhash] || {}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user