Apply suggestions from code review

Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
Sidharth Vinod
2024-06-30 14:47:03 +05:30
committed by GitHub
parent d8d608fd99
commit 8b8c0dd57c
2 changed files with 2 additions and 4 deletions

View File

@@ -56,9 +56,7 @@ const handler = (e) => {
const main = async () => { const main = async () => {
await generateLangium(); await generateLangium();
await mkdir('stats').catch(() => { await mkdir('stats', {recursive: true});
// Ignore error if directory already exists
});
const packageNames = Object.keys(packageOptions) as (keyof typeof packageOptions)[]; const packageNames = Object.keys(packageOptions) as (keyof typeof packageOptions)[];
// it should build `parser` before `mermaid` because it's a dependency // it should build `parser` before `mermaid` because it's a dependency
for (const pkg of packageNames) { for (const pkg of packageNames) {

View File

@@ -229,7 +229,7 @@ export const setWrap = function (wrapSetting?: boolean) {
}; };
const extractWrap = (text?: string): { cleanedText?: string; wrap?: boolean } => { const extractWrap = (text?: string): { cleanedText?: string; wrap?: boolean } => {
if (!text) { if (text === undefined) {
return {}; return {};
} }
text = text.trim(); text = text.trim();