mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Merge branch 'devel' into i18n2
This commit is contained in:
commit
603fafae37
3 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Vulcan
|
||||
|
||||
[Version 1.8.1](https://github.com/VulcanJS/Vulcan/releases)
|
||||
[Version 1.10.0](https://github.com/VulcanJS/Vulcan/releases)
|
||||
|
||||
Vulcan is a React+GraphQL framework for Meteor.
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ export default function withAccess (options) {
|
|||
// redirect on constructor if user cannot access
|
||||
constructor(props) {
|
||||
super(props);
|
||||
if(!this.canAccess(props.currentUser)) {
|
||||
if(!this.canAccess(props.currentUser) && typeof redirect === 'string') {
|
||||
props.router.push(redirect);
|
||||
}
|
||||
}
|
||||
|
@ -33,4 +33,4 @@ export default function withAccess (options) {
|
|||
|
||||
return withRouter(withCurrentUser(AccessComponent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ export const getDefaultResolvers = (collectionName, resolverOptions = defaultOpt
|
|||
// don't use Dataloader if doc is selected by slug
|
||||
const doc = documentId
|
||||
? await collection.loader.load(documentId)
|
||||
: slug ? await Connectors.get(collection, { slug }) : await Connectors.get();
|
||||
: slug ? await Connectors.get(collection, { slug }) : await Connectors.get(collection);
|
||||
|
||||
if (!doc) {
|
||||
const MissingDocumentError = createError('app.missing_document', { message: 'app.missing_document' });
|
||||
|
|
Loading…
Add table
Reference in a new issue