Favourites: stabilize preferences and adding/removing favourites

This commit is contained in:
Pieter Vander Vennet 2023-11-23 17:06:30 +01:00
parent f9827dd6ae
commit 3ce21f61cb
8 changed files with 122 additions and 47 deletions

View file

@ -301,10 +301,14 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
if (str === undefined || str === null) {
return undefined
}
if (typeof str !== "string") {
console.error("Not a string:", str)
return undefined
}
if (str.length <= l) {
return str
}
return str.substr(0, l - 3) + "..."
return str.substr(0, l - 1) + "…"
}
/**