Skip to content

Commit 08bc799

Browse files
authored
Remove excess undefined check
1 parent 7ce247c commit 08bc799

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

js/helpinject.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,8 @@
6060
} catch (e) {
6161
console.error('Unable to parse release information', e);
6262
}
63-
if (typeof lastest.tag_name !== "undefined") {
64-
// Run the callback
65-
cb(semverRegex().test(version) ? semverNumbersOnly(semverRegex().exec(version)[0]) : null);
66-
} else {
67-
console.error('GitHub did not return the expected data');
68-
}
63+
// Run the callback
64+
cb(semverRegex().test(lastest.tag_name) ? semverNumbersOnly(semverRegex().exec(lastest.tag_name)[0]) : null);
6965
} else {
7066
// Something went wrong. Fail quietly
7167
console.error('Unable to fetch release information');

0 commit comments

Comments
 (0)