Skip to content

Commit 52548ff

Browse files
committed
Only run URL normalizer on non-empty values
1 parent b45b222 commit 52548ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

issue-to-json.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ async function parseIssueBody(githubFormData, body) {
4343
});
4444
}
4545
if(fieldLabel && fieldLabel.toLowerCase() === "url" || fields[j].id === "url" || fields[j].id.endsWith("_url") || fields[j].id.startsWith("url_")) {
46-
entry = await cleanupUrl(entry);
46+
if(entry) {
47+
entry = await cleanupUrl(entry);
48+
}
4749
}
4850

4951
returnObject[fields[j].id] = entry;

0 commit comments

Comments
 (0)