Merge branch 'devel' into i18n2

This commit is contained in:
SachaG 2018-05-09 11:23:17 +09:00
commit 603fafae37
3 changed files with 4 additions and 4 deletions

View file

@ -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.

View file

@ -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));
}
}
}

View file

@ -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' });