forked from MapComplete/MapComplete
Favourites: stabilize preferences and adding/removing favourites
This commit is contained in:
parent
f9827dd6ae
commit
3ce21f61cb
8 changed files with 122 additions and 47 deletions
|
@ -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) + "…"
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue