mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
[BrowserTest] rubocop change to an if()
Change-Id: I5ae9ec4d94af88fa67ac8de58a38b6ea03b14acc
This commit is contained in:
parent
3d61fe724d
commit
473877202b
|
@ -36,8 +36,3 @@ Style/Documentation:
|
|||
Style/GlobalVars:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: MaxLineLength.
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
|
||||
|
|
|
@ -34,9 +34,7 @@ def crop_image(path, page_elements, offset_element)
|
|||
|
||||
# It happens with some elements that an image goes off the screen a bit,
|
||||
# and chunky_png fails when this happens
|
||||
if image.width < top_left_x + width
|
||||
width = image.width - top_left_x
|
||||
end
|
||||
width = image.width - top_left_x if image.width < top_left_x + width
|
||||
|
||||
image.crop!(top_left_x, top_left_y, width, height)
|
||||
image.save path
|
||||
|
|
Loading…
Reference in a new issue