mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 14:27:10 +00:00
reduce redundant trim()s
This commit is contained in:
1 parent
2c4f3473e5
commit
6693fb1c13
1 file changed
+1
-1
@@ -433,7 +433,7 @@ const CodeEditor = createClass({
|
|||||||
}
|
}
|
||||||
text = foldPreviewText || `Lines ${from.line+1}-${to.line+1}`;
|
text = foldPreviewText || `Lines ${from.line+1}-${to.line+1}`;
|
||||||
|
|
||||||
text = text.trim().replace('{', '').trim();
|
text = text.replace('{', '').trim();
|
||||||
if(text.length > maxLength)
|
if(text.length > maxLength)
|
||||||
text = `${text.substr(0, maxLength)}...`;
|
text = `${text.substr(0, maxLength)}...`;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user