Skip to content

Commit 37c8ffa

Browse files
committed
only lock if enabled
1 parent cbec00d commit 37c8ffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ var jsonp = require('./wrapper/jsonp.js');
1010

1111
(function() {
1212
if (window[cst.GLOBAL_LOCK]) return;
13-
window[cst.GLOBAL_LOCK] = true;
1413

1514
var query = url.parse(location.href, true).query;
1615
// enable if the switch is on
1716
var mock = query[cst.QUERY_MOCK_ENABLED] || cookies.getItem(document.cookie, cst.COOKIE_MOCK_ENABLED);
1817
if (mock === cst.COOKIE_MOCK_ENABLED_OK) {
1918
enableIntercept();
19+
window[cst.GLOBAL_LOCK] = true;
2020
}
2121
// update cookies (invalid values mean disabled)
2222
if (query[cst.QUERY_MOCK_ENABLED]) {

0 commit comments

Comments
 (0)