Skip to content

Commit b101774

Browse files
author
Naka Masato
committed
aa
1 parent 97fd2a4 commit b101774

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

dist/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14648,11 +14648,12 @@ function getLabelGlobMapFromObject(configObject) {
1464814648
for (const configType in configObject) {
1464914649
if (configType == "changed_file") {
1465014650
for (const label in configObject["changed_file"]) {
14651-
if (typeof configObject[label] === "string") {
14652-
labelGlobs.set(label, [configObject[label]]);
14651+
const val = configObject["changed_file"][label];
14652+
if (typeof val === "string") {
14653+
labelGlobs.set(label, [val]);
1465314654
}
14654-
else if (configObject[label] instanceof Array) {
14655-
labelGlobs.set(label, configObject[label]);
14655+
else if (val instanceof Array) {
14656+
labelGlobs.set(label, val);
1465614657
}
1465714658
else {
1465814659
throw Error(`found unexpected type for label ${label} (should be string or array of globs)`);

src/main.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,11 @@ function getLabelGlobMapFromObject(
158158
for (const configType in configObject) {
159159
if (configType == "changed_file") {
160160
for (const label in configObject["changed_file"]) {
161-
if (typeof configObject[label] === "string") {
162-
labelGlobs.set(label, [configObject[label]]);
163-
} else if (configObject[label] instanceof Array) {
164-
labelGlobs.set(label, configObject[label]);
161+
const val = configObject["changed_file"][label]
162+
if (typeof val === "string") {
163+
labelGlobs.set(label, [val]);
164+
} else if (val instanceof Array) {
165+
labelGlobs.set(label, val);
165166
} else {
166167
throw Error(
167168
`found unexpected type for label ${label} (should be string or array of globs)`

0 commit comments

Comments
 (0)