Skip to content

Commit 094c1c1

Browse files
committed
Make linter happy
1 parent 20a965d commit 094c1c1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/authutil.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ function writeRegistryToFile(
2525
if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) {
2626
scope = github.context.repo.owner;
2727
}
28-
if (!scope && namePrefix = require('./package').name.match('@[^/]+')) {
29-
scope = namePrefix[0];
28+
if (!scope) {
29+
let namePrefix = require('./package').name.match('@[^/]+');
30+
if (namePrefix) {
31+
scope = namePrefix[0];
32+
}
3033
}
3134
if (scope && scope[0] != '@') {
3235
scope = '@' + scope;

0 commit comments

Comments
 (0)