Skip to content

Commit

Permalink
Merge pull request #1916 from origo-map/json-load-fix
Browse files Browse the repository at this point in the history
fix: sorting out default controls from json
  • Loading branch information
johnnyblasta authored Dec 7, 2023
2 parents dd20f84 + c48c107 commit 582c89c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/loadresources.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const loadResources = async function loadResources(mapOptions, config) {
if (mapOptions.controls) {
mapOptions.controls.forEach((control) => {
const matchingControlIndex = map.options.controls.findIndex(
(defaultControl) => (defaultControl.name === control.name)
() => (config.defaultControls.name === control.name)
);
if (matchingControlIndex !== -1) {
Object.assign(map.options.controls[matchingControlIndex], control);
Expand Down

0 comments on commit 582c89c

Please sign in to comment.