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

This commit is contained in:
Shane Kilkelly 2018-05-18 11:25:01 +01:00
parent 4acd55b1c6
commit 2b99080ed3

View file

@ -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)