Skip to content

Commit

Permalink
Use args instead of arguments, because of strict type
Browse files Browse the repository at this point in the history
  • Loading branch information
sfroemkenjw committed Mar 19, 2024
1 parent 7947662 commit 050901d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Resources/Private/Build/JavaScript/GoogleMaps2.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,15 +667,15 @@ function initMap () {

// Pass in the objects to merge as arguments.
// For a deep extend, set the first argument to `true`.
const extend = (...arguments) => {
const extend = (...args) => {
let extended = {};
let deep = false;
let i = 0;
let length = arguments.length;
let length = args.length;

// Check for deep merge
if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {
deep = arguments[0];
if (Object.prototype.toString.call(args[0]) === '[object Boolean]') {
deep = args[0];
i++;
}

Expand All @@ -695,7 +695,7 @@ function initMap () {

// Loop through each object and conduct a merge
for ( ; i < length; i++ ) {
var obj = arguments[i];
var obj = args[i];
merge(obj);
}

Expand Down
10 changes: 5 additions & 5 deletions Resources/Private/Build/JavaScript/OpenStreetMap2.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,15 +551,15 @@ document.querySelectorAll(".maps2").forEach((element) => {

// Pass in the objects to merge as arguments.
// For a deep extend, set the first argument to `true`.
const extend = (...arguments) => {
const extend = (...args) => {
let extended = {};
let deep = false;
let i = 0;
let length = arguments.length;
let length = args.length;

// Check for deep merge
if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {
deep = arguments[0];
if (Object.prototype.toString.call(args[0]) === '[object Boolean]') {
deep = args[0];
i++;
}

Expand All @@ -579,7 +579,7 @@ document.querySelectorAll(".maps2").forEach((element) => {

// Loop through each object and conduct a merge
for ( ; i < length; i++ ) {
var obj = arguments[i];
var obj = args[i];
merge(obj);
}

Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/GoogleMaps2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/GoogleMaps2.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/OpenStreetMap2.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/OpenStreetMap2.min.js.map

Large diffs are not rendered by default.

0 comments on commit 050901d

Please sign in to comment.