Commit eee712c8 authored by Douwe Maan's avatar Douwe Maan

Empty blob viewer isn’t binary-only

parent fc1090d9
...@@ -176,7 +176,7 @@ class Blob < SimpleDelegator ...@@ -176,7 +176,7 @@ class Blob < SimpleDelegator
end end
def rendered_as_text?(ignore_errors: true) 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 end
def show_viewer_switcher? def show_viewer_switcher?
......
...@@ -4,6 +4,5 @@ module BlobViewer ...@@ -4,6 +4,5 @@ module BlobViewer
include ServerSide include ServerSide
self.partial_name = 'empty' self.partial_name = 'empty'
self.binary = true
end end
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