Skip to content

Commit

Permalink
Bugfix: should not try to select map if it is not listed on load
Browse files Browse the repository at this point in the history
  • Loading branch information
Glodenox committed Nov 24, 2015
1 parent 9c01c7a commit 702547a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions WME_OpenMaps.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// @include https://www.waze.com/*/editor/*
// @include https://www.waze.com/editor/*
// @include https://editor-beta.waze.com/*
// @version 2.2.1
// @version 2.2.2
// @grant none
// ==/UserScript==

Expand Down Expand Up @@ -189,13 +189,13 @@
openMapsSelector.appendChild(optgroup);
}
categories[category].appendChild(option);
// Select the map again if it was selected at the end of the previous session
if (localStorage.OM_previousMap == id) {
openMapsSelector.selectedIndex = option.index;
openMapsSelector.dispatchEvent(new Event('change'));
}
}
// Select the map again if it was selected at the end of the previous session
if (localStorage.OM_previousMap == id) {
openMapsSelector.selectedIndex = option.index;
openMapsSelector.dispatchEvent(new Event('change'));
}


maps.push({
name: name,
category: category,
Expand Down

0 comments on commit 702547a

Please sign in to comment.