Skip to content

Commit

Permalink
fix: Fix issue with 'ordered' property when using lists
Browse files Browse the repository at this point in the history
  • Loading branch information
LulaV14 committed Mar 1, 2022
1 parent 9bda7c9 commit 8d28a36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ const heading = ({ node, level, children, ...props }) => {
);
};

const getList = ({ node, ...props }) => {
const { start, ordered, children, depth } = props;
if (props.start !== null && props.start !== 1 && props.start !== undefined) {
props.start = start.toString();
const getList = ({ node, children, depth, ordered, start, ...props }) => {
if (start !== null && start !== 1 && start !== undefined) {
start = start.toString();
}
let styleType = 'disc';
if (ordered) styleType = 'decimal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ const heading = ({ node, children, level, ...props }) => {
);
};

const getList = ({ node, ...props }) => {
const { ordered, children, depth } = props;
const getList = ({ node, children, depth, ordered, ...props }) => {
let styleType = 'disc';
if (ordered) styleType = 'decimal';
if (depth === 1) styleType = 'circle';
Expand Down

0 comments on commit 8d28a36

Please # to comment.