mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Apply suggestions from code review
Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
@@ -56,9 +56,7 @@ const handler = (e) => {
|
||||
|
||||
const main = async () => {
|
||||
await generateLangium();
|
||||
await mkdir('stats').catch(() => {
|
||||
// Ignore error if directory already exists
|
||||
});
|
||||
await mkdir('stats', {recursive: true});
|
||||
const packageNames = Object.keys(packageOptions) as (keyof typeof packageOptions)[];
|
||||
// it should build `parser` before `mermaid` because it's a dependency
|
||||
for (const pkg of packageNames) {
|
||||
|
@@ -229,7 +229,7 @@ export const setWrap = function (wrapSetting?: boolean) {
|
||||
};
|
||||
|
||||
const extractWrap = (text?: string): { cleanedText?: string; wrap?: boolean } => {
|
||||
if (!text) {
|
||||
if (text === undefined) {
|
||||
return {};
|
||||
}
|
||||
text = text.trim();
|
||||
|
Reference in New Issue
Block a user