mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
ordered lists bugfix: first line item can be 0.*, don't show 0 as undefined (#4600)
This commit is contained in:
parent
4862d6fa9c
commit
e02246641e
1 changed files with 2 additions and 0 deletions
|
@ -237,6 +237,8 @@ const getTXTFromAtext = (pad, atext, authorColors) => {
|
||||||
if (line.listLevel > 1) {
|
if (line.listLevel > 1) {
|
||||||
let x = 1;
|
let x = 1;
|
||||||
while (x <= line.listLevel - 1) {
|
while (x <= line.listLevel - 1) {
|
||||||
|
// if it's undefined to avoid undefined.undefined.1 for 0.0.1
|
||||||
|
if (!listNumbers[x]) listNumbers[x] = 0;
|
||||||
pieces.push(`${listNumbers[x]}.`);
|
pieces.push(`${listNumbers[x]}.`);
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue