0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-28 04:52:40 +00:00

reduce redundant trim()s

This commit is contained in:
David Bolack
2024-07-20 21:40:22 -05:00
parent 2c4f3473e5
commit 6693fb1c13

View File

@@ -433,7 +433,7 @@ const CodeEditor = createClass({
}
text = foldPreviewText || `Lines ${from.line+1}-${to.line+1}`;
text = text.trim().replace('{', '').trim();
text = text.replace('{', '').trim();
if(text.length > maxLength)
text = `${text.substr(0, maxLength)}...`;