Skip to content

Commit

Permalink
Small adjustments to prevent errors
Browse files Browse the repository at this point in the history
Related to #416.
  • Loading branch information
stefandesu committed Jun 11, 2019
1 parent ccf8dad commit 3f15704
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ export default {
this.$store.dispatch("auth/init", this.config.auth)
}
// Look up local mappings count and show warning if there are too many.
this.getMappings({ registry: "http://coli-conc.gbv.de/registry/local-mappings", limit: 1 }).then(mappings => {
// Note: Do not use this.getMappings here because it leads to issues when schemes are not loaded yet.
this.$store.dispatch({ type: "mapping/getMappings", registry: "http://coli-conc.gbv.de/registry/local-mappings", limit: 1 }).then(mappings => {
if (mappings.totalCount && mappings.totalCount >= 500) {
this.alert(this.$t("general.tooManyMappings", { count: mappings.totalCount }), 0)
}
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default {
this.adjustConcept(object)

// Provider adjustments
let provider = _.get(this._getObject(_.get(object, "inScheme[0]")), "_provider", options.provider)
let provider = _.get(object, "_provider") || _.get(this._getObject(_.get(object, "inScheme[0]")), "_provider") || options.provider
if (provider) {
if (type == "scheme") {
provider.adjustSchemes([object])
Expand Down

0 comments on commit 3f15704

Please sign in to comment.