Browse Source

OpenStreetBrowserLoader: avoid duplicate categories

master
parent
commit
ce8a1c2a5d
  1. 5
      src/OpenStreetBrowserLoader.js

5
src/OpenStreetBrowserLoader.js

@ -89,6 +89,11 @@ OpenStreetBrowserLoader.prototype.getTemplate = function (id, callback) {
} }
OpenStreetBrowserLoader.prototype.getCategoryFromData = function (id, data, callback) { OpenStreetBrowserLoader.prototype.getCategoryFromData = function (id, data, callback) {
if (id in this.categories) {
callback(null, this.categories[id])
return
}
if (!data.type) { if (!data.type) {
return callback(new Error('no type defined'), null) return callback(new Error('no type defined'), null)
} }

Loading…
Cancel
Save