Skip to content

Commit

Permalink
Fix bug caused by change in W.model.states.additionalInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
mapomatic committed Apr 3, 2019
1 parent 0da1047 commit b205944
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WME-FC-Layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// // ==UserScript==
// @name WME FC Layer
// @namespace https://greasyfork.org/users/45389
// @version 2019.03.11.002
// @version 2019.04.02.001
// @description Adds a Functional Class layer for states that publish ArcGIS FC data.
// @author MapOMatic
// @include /^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor\/?.*$/
Expand Down Expand Up @@ -1634,7 +1634,7 @@

function getVisibleStateAbbrs() {
var visibleStates = [];
W.model.states.additionalInfo.forEach(function (state) {
W.model.states.getObjectArray().forEach(function (state) {
var stateAbbr = _statesHash[state.name];
var activeStateAbbr = _settings.activeStateAbbr;
if (_stateSettings[stateAbbr] && _stateSettings.global.isPermitted(stateAbbr) && (!activeStateAbbr || activeStateAbbr === 'ALL' || activeStateAbbr === stateAbbr)) {
Expand Down Expand Up @@ -2086,7 +2086,7 @@
if (W && W.loginManager &&
W.loginManager.events &&
W.loginManager.events.register &&
W.model && W.model.states && W.model.states.additionalInfo &&
W.model && W.model.states && W.model.states.getObjectArray().length &&
W.map && W.loginManager.user &&
WazeWrap.Ready) {
log('Initializing...', 0);
Expand Down

0 comments on commit b205944

Please sign in to comment.