We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe892c5 commit a9a6fd0Copy full SHA for a9a6fd0
1 file changed
src/index.js
@@ -22,7 +22,7 @@ if (!arg) {
22
23
for (const scriptName of Object.keys(packageScripts)) {
24
const desc = whyScriptsDesc[scriptName];
25
- const descWithLineBreaks = desc.split("\\n").join("\n ");
+ const descWithLineBreaks = desc?.split("\\n").join("\n ");
26
const packageScript = packageScripts[scriptName];
27
28
console.log(`\n\x1b[32m${scriptName}\x1b[0m:`);
@@ -83,7 +83,7 @@ if (scriptDesc) {
83
fs.writeFileSync(packageWhyPath, JSON.stringify(whyObj, undefined, 2));
84
}
85
const desc = scriptDesc || whyObj["scripts"][scriptName];
86
-const descWithLineBreaks = desc.split("\\n").join("\n ");
+const descWithLineBreaks = desc?.split("\\n").join("\n ");
87
console.log(
88
"\x1b[33m%s\x1b[0m",
89
`\n ${
0 commit comments