diff options
-rw-r--r-- | app/models/blob.rb | 2 | ||||
-rw-r--r-- | app/models/blob_viewer/empty.rb | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb index 6a42a12891c..bba23bbb7e0 100644 --- a/app/models/blob.rb +++ b/app/models/blob.rb @@ -176,7 +176,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? diff --git a/app/models/blob_viewer/empty.rb b/app/models/blob_viewer/empty.rb index d9d128eb273..2380578ed72 100644 --- a/app/models/blob_viewer/empty.rb +++ b/app/models/blob_viewer/empty.rb @@ -4,6 +4,5 @@ module BlobViewer include ServerSide self.partial_name = 'empty' - self.binary = true end end |