planetfederal / GeoExplorer

Notice: This application has been folded into the OpenGeo Suite repository
https://github.com/opengeo/suite/blob/dev/geoexplorer/README.md
BSD 3-Clause "New" or "Revised" License
78 stars 60 forks source link

Issue with /^world/.match(name) #20

Open sergemarkin opened 12 years ago

sergemarkin commented 12 years ago

Chrome complained on this statement in GeoExplorer.js. This error prevented GeoExplorer from complete initialization. As a result I had GeoExplorer in semi-loaded state and there were no ability to add layers. Background layer also was missed.

I've did a hack - replaced this instruction with statement true. To be more specific (I've modified minimized version - have no time to dig deeper):

It was like this:

OpenLayers.Util.applyDefaults({attribution:/^world/.match(name)?"MapBox | Some Data © OSM CC-BY-SA |..."

and I've changed into:

OpenLayers.Util.applyDefaults({attribution:true?"MapBox | Some Data © OSM CC-BY-SA |..."

After this modification it has started working.

Looks like this way of using RegExp dont work. At least in Chrome.