This commit is contained in:
Sana Javed 2023-05-23 14:54:13 +02:00
parent 599abec691
commit 1ebc87908f

View File

@ -263,9 +263,11 @@ const getCanSplit = (
const exampleSourceLengths = [...scssExamples, ...sassExamples].flatMap(
(source) => source.split('\n').map((line) => line.length),
);
const cssSourceLengths = cssExamples.length ? cssExamples.flatMap((source) =>
source.split('\n').map((line) => line.length),
) : [0];
const cssSourceLengths = cssExamples.length
? cssExamples.flatMap((source) =>
source.split('\n').map((line) => line.length),
)
: [0];
const maxSourceWidth = Math.max(...exampleSourceLengths);
const maxCSSWidth = Math.max(...cssSourceLengths);