File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
dev-packages/size-limit-gh-action Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ async function run() {
181
181
}
182
182
} else {
183
183
core . debug ( 'Skipping comment because there are no changes.' ) ;
184
+ core . debug ( `Base result:\n\n${ base } ` ) ;
184
185
}
185
186
186
187
if ( status > 0 ) {
Original file line number Diff line number Diff line change @@ -97,13 +97,17 @@ export class SizeLimitFormatter {
97
97
}
98
98
99
99
hasSizeChanges ( base , current , threshold = 0 ) {
100
- const names = [ ...new Set ( [ ...( base ? Object . keys ( base ) : [ ] ) , ...Object . keys ( current ) ] ) ] ;
100
+ if ( ! base || ! current ) {
101
+ return true ;
102
+ }
101
103
102
- return ! ! names . find ( name => {
103
- const baseResult = base ?. [ name ] || EmptyResult ;
104
+ const names = [ ...new Set ( [ ...( Object . keys ( base ) ) , ...Object . keys ( current ) ] ) ] ;
105
+
106
+ return names . some ( name => {
107
+ const baseResult = base [ name ] || EmptyResult ;
104
108
const currentResult = current [ name ] || EmptyResult ;
105
109
106
- if ( baseResult . size === 0 && currentResult . size === 0 ) {
110
+ if ( baseResult . size === 0 || currentResult . size === 0 ) {
107
111
return true ;
108
112
}
109
113
You can’t perform that action at this time.
0 commit comments