mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-08 00:29:04 +02:00
Make string replace op safer
This commit is contained in:
@@ -110,7 +110,7 @@ define [
|
||||
if data.length >= (TWO_MEGABYTES - 200)
|
||||
$scope.textPreview.shouldShowDots = true
|
||||
# remove last partial line
|
||||
data = data.replace(/\n.*$/, '')
|
||||
data = data?.replace?(/\n.*$/, '')
|
||||
$scope.textPreview.data = data
|
||||
$timeout(setHeight, 0)
|
||||
.catch (error) ->
|
||||
|
||||
Reference in New Issue
Block a user