@ -45,7 +45,8 @@ class OpenStreetBrowserLoader {
opt.categoryId = ids.entityId
opt.repositoryId = ids.repositoryId
this.getRepo(ids.repositoryId, opt, function (err, repoData) {
this.getRepository(ids.repositoryId, opt, (err, repository) => {
const repoData = repository.data
// maybe loaded in the meantime?
if (ids.fullId in this.categories) {
return callback(null, this.categories[ids.fullId])
@ -24,11 +24,13 @@ function addCategoriesShow (repo, options={}) {
content.innerHTML = '<h3>' + lang('more_categories') + '</h3>' + '<i class="fa fa-spinner fa-pulse fa-fw"></i> ' + lang('loading')
OpenStreetBrowserLoader.getRepo(repo, options, function (err, repoData) {
OpenStreetBrowserLoader.getRepository(repo, options, function (err, repository) {
if (err) {
alert(err)
}
content.innerHTML = '<h3>' + lang('more_categories') + '</h3>'
var categoryUrl = null