Skip to content

Commit

Permalink
chore: replace var with let
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Aug 5, 2024
1 parent 389ad8f commit 38d75ec
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions packages/analytics-js/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
window.rudderAnalyticsMount = function() {
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -71,7 +71,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/loading-scripts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if (Array.isArray(rudderanalytics)) {
// globalThis polyfill as polyfill-fastly.io one does not work in legacy safari
(function () {
if (typeof globalThis === 'undefined') {
var getGlobal = function () {
let getGlobal = function () {
if (typeof self !== 'undefined') {
return self;
}
Expand All @@ -111,7 +111,7 @@ if (Array.isArray(rudderanalytics)) {
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/index-cdn.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
window.rudderAnalyticsMount = function() {
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/index-local.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
window.rudderAnalyticsMount = function() {
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/index-npm-bundled.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<script>
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -107,7 +107,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/index-npm.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<script>
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -107,7 +107,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/integrations/index-cdn.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
window.rudderAnalyticsMount = function() {
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/integrations/index-local.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
window.rudderAnalyticsMount = function() {
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<script>
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/integrations/index-npm.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<script>
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/manualLoadCall/index-cdn.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
window.rudderAnalyticsMount = function() {
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
window.rudderAnalyticsMount = function() {
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<script>
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity-suite/public/v3/manualLoadCall/index-npm.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<script>
(function() {
if (typeof globalThis === "undefined") {
var getGlobal = function() {
let getGlobal = function() {
if (typeof self !== "undefined") {
return self;
}
Expand All @@ -93,7 +93,7 @@
return null;
};

var global = getGlobal();
let global = getGlobal();

if (global) {
Object.defineProperty(global, 'globalThis', {
Expand Down

0 comments on commit 38d75ec

Please sign in to comment.