File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -14648,11 +14648,12 @@ function getLabelGlobMapFromObject(configObject) {
14648
14648
for (const configType in configObject) {
14649
14649
if (configType == "changed_file") {
14650
14650
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]);
14653
14654
}
14654
- else if (configObject[label] instanceof Array) {
14655
- labelGlobs.set(label, configObject[label] );
14655
+ else if (val instanceof Array) {
14656
+ labelGlobs.set(label, val );
14656
14657
}
14657
14658
else {
14658
14659
throw Error(`found unexpected type for label ${label} (should be string or array of globs)`);
Original file line number Diff line number Diff line change @@ -158,10 +158,11 @@ function getLabelGlobMapFromObject(
158
158
for ( const configType in configObject ) {
159
159
if ( configType == "changed_file" ) {
160
160
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 ) ;
165
166
} else {
166
167
throw Error (
167
168
`found unexpected type for label ${ label } (should be string or array of globs)`
You can’t perform that action at this time.
0 commit comments