Skip to content

Commit

Permalink
Fix issue with mapping registry (#514)
Browse files Browse the repository at this point in the history
This caused the getter for the current mapping registry to return null if the user has not selected a registry and is not authorized to save into any registry.

Needs to be fixed properly at some point in #515.
  • Loading branch information
stefandesu committed Nov 7, 2019
1 parent 7382bdf commit 0dc5263
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ const getters = {
user: state.auth.user,
}))
}
if (!registry) {
// Fallback to first registry which can save mappings (even if the user is not authorized for it)
registry = state.config.registries.find(registry => _.get(registry, "provider.has.mappings.create"))
}
return registry
},
/**
Expand Down

0 comments on commit 0dc5263

Please sign in to comment.