Skip to content

Commit a9711eb

Browse files
fix: handle version is empy
1 parent 312e962 commit a9711eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/helpers/github-link.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function githubLink([project, version, file, line], { isEdit = false }) {
55
const isEmberProject = project === 'ember';
66
const majorVersion = parseInt(version?.split('.')[0].replace('v', ''), 10);
77

8-
const baseVersion = `v${version.replace(/^v/, '')}`;
8+
const baseVersion = version ? `v${version.replace(/^v/, '')}` : 'main';
99

1010
// Check if the project is 'ember' and adjust the tag only if the major version is >= 6 to match the Git tags
1111
const adjustedVersion =

0 commit comments

Comments
 (0)