Просмотр исходного кода

Fix rendering of long previews, stop cutting off last line in short ones

Shane Kilkelly 8 лет назад
Родитель
Сommit
2b99080ed3

+ 1 - 3
services/web/public/coffee/ide/binary-files/controllers/BinaryFileController.coffee

@@ -92,11 +92,9 @@ define [
 					# show dots when payload is closs to cutoff
 					if data.length >= (TWO_MEGABYTES - 200)
 						$scope.textPreview.shouldShowDots = true
-					try
 						# remove last partial line
 						data = data.replace(/\n.*$/, '')
-					finally
-						$scope.textPreview.data = data
+					$scope.textPreview.data = data
 					$timeout(setHeight, 0)
 				.catch (error) ->
 					console.error(error)