use substring over slice for strings
This commit is contained in:
parent
a5a6351cce
commit
d1950bc5f1
@ -360,7 +360,7 @@ class DisplaySearch extends Display {
|
||||
setTitleText(text) {
|
||||
// Chrome limits title to 1024 characters
|
||||
if (text.length > 1000) {
|
||||
text = text.slice(0, 1000) + '...';
|
||||
text = text.substring(0, 1000) + '...';
|
||||
}
|
||||
|
||||
if (text.length === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user