mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 15:19:35 +02:00
code style, refactor removal of trailing zeroes
This commit is contained in:
parent
ca6e5a0d54
commit
cee3a78d8e
1 changed files with 8 additions and 10 deletions
|
@ -31,10 +31,8 @@ const parseLocation = (profile, l, lines) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove trailing zeroes, todo
|
// remove trailing zeroes, todo
|
||||||
if(res.id && res.id.length > 2){
|
if (res.id && res.id.length > 0) {
|
||||||
while(res.id.slice(0, 1) === '0'){
|
res.id = res.id.replace(/^0+/, '')
|
||||||
res.id = res.id.slice(1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Add table
Reference in a new issue