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( const exampleSourceLengths = [...scssExamples, ...sassExamples].flatMap(
(source) => source.split('\n').map((line) => line.length), (source) => source.split('\n').map((line) => line.length),
); );
const cssSourceLengths = cssExamples.length ? cssExamples.flatMap((source) => const cssSourceLengths = cssExamples.length
source.split('\n').map((line) => line.length), ? cssExamples.flatMap((source) =>
) : [0]; source.split('\n').map((line) => line.length),
)
: [0];
const maxSourceWidth = Math.max(...exampleSourceLengths); const maxSourceWidth = Math.max(...exampleSourceLengths);
const maxCSSWidth = Math.max(...cssSourceLengths); const maxCSSWidth = Math.max(...cssSourceLengths);