Skip to content

Commit 85e7f56

Browse files
committed
disbale image check for non binary files
1 parent 6ea6e2b commit 85e7f56

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

templates/repo/diff/box.tmpl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@
7272
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header df ac sb">
7373
<div class="df ac">
7474
{{$isImage := false}}
75-
{{if $file.IsDeleted}}
76-
{{$isImage = (call $.IsImageFileInBase $file.Name)}}
77-
{{else}}
78-
{{$isImage = (call $.IsImageFileInHead $file.Name)}}
75+
{{if $file.IsBin}}
76+
{{if $file.IsDeleted}}
77+
{{$isImage = (call $.IsImageFileInBase $file.Name)}}
78+
{{else}}
79+
{{$isImage = (call $.IsImageFileInHead $file.Name)}}
80+
{{end}}
7981
{{end}}
8082
{{$isCsv := (call $.IsCsvFile $file)}}
8183
{{$showFileViewToggle := or $isImage $isCsv}}

0 commit comments

Comments
 (0)