Commit 299a3a9a authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'dm-empty-blob-viewer-binary' into 'master'

Empty blob viewer isn’t binary-only

See merge request !11979
parents e9002222 eee712c8
......@@ -180,7 +180,7 @@ class Blob < SimpleDelegator
end
def rendered_as_text?(ignore_errors: true)
simple_viewer.text? && (ignore_errors || simple_viewer.render_error.nil?)
simple_viewer.is_a?(BlobViewer::Text) && (ignore_errors || simple_viewer.render_error.nil?)
end
def show_viewer_switcher?
......
......@@ -4,6 +4,5 @@ module BlobViewer
include ServerSide
self.partial_name = 'empty'
self.binary = true
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment