Skip to content

Commit 551e95a

Browse files
committed
assign and set null inside function
1 parent 2173d3f commit 551e95a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/scripts/contentscript.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
(() => {
22
'use strict';
33

4-
// Define browser for cross-browser compatibility
5-
var browser = (typeof browser !== 'undefined') ? browser : chrome;
6-
74
function changeMergeButtonState() {
5+
// Define browser for cross-browser compatibility
6+
var browser = (typeof browser !== 'undefined') ? browser : chrome;
7+
88
let container = document.querySelector('#js-repo-pjax-container');
99
let issueTitle = container.querySelector('.js-issue-title')?.textContent;
1010
let buttonMerges = container.querySelectorAll('.merge-message button[data-details-container]');
@@ -62,6 +62,7 @@
6262
storageData = null;
6363
isSquashCommits = null;
6464
isWipTag = null;
65+
browser = null;
6566

6667
setTimeout(changeMergeButtonState, 1000);
6768
});

0 commit comments

Comments
 (0)