@@ -168,6 +168,10 @@ function allIncluded() {
168
168
const MAX_CACHE_SIZE = 50 * 1024 * 1024 ; //50mb max cache
169
169
170
170
function saveToStorage ( data , subject = null ) {
171
+ if ( data === githubCache . data && subject === githubCache . subject ) {
172
+ log ( 'Skipping cache save - no changes' ) ;
173
+ return Promise . resolve ( true ) ;
174
+ }
171
175
const cacheData = {
172
176
data : data ,
173
177
cacheKey : githubCache . cacheKey ,
@@ -370,7 +374,7 @@ function allIncluded() {
370
374
githubPrsReviewDataProccessed = { } ;
371
375
372
376
// Update subject
373
- if ( ! scrumSubject ?. value ) {
377
+ if ( ! githubCache . subject ) {
374
378
scrumSubjectLoaded ( ) ;
375
379
}
376
380
}
@@ -463,7 +467,7 @@ function allIncluded() {
463
467
githubCache . subject = subject ;
464
468
saveToStorage ( githubCache . data , subject ) ;
465
469
466
- if ( scrumSubject ) {
470
+ if ( scrumSubject && scrumSubject . value !== subject ) {
467
471
scrumSubject . value = subject ;
468
472
scrumSubject . dispatchEvent ( new Event ( 'input' , { bubbles : true } ) ) ;
469
473
}
@@ -684,7 +688,9 @@ function allIncluded() {
684
688
685
689
clearInterval ( intervalSubject ) ;
686
690
scrumSubject = elements . subject ;
687
- scrumSubjectLoaded ( ) ;
691
+ if ( ! scrumSubject . value ) {
692
+ scrumSubjectLoaded ( ) ;
693
+ }
688
694
} , 500 ) ;
689
695
690
696
//check for github safe writing
0 commit comments