Skip to content

Commit

Permalink
Clean up a couple things
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaG committed Feb 22, 2017
1 parent 113b68f commit 03d5fe7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/framework-demo/lib/components/MoviesItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Wrapped with the "withCurrentUser" container.

import React, { PropTypes, Component } from 'react';
import { Button } from 'react-bootstrap';
import { Components, registerComponent, withCurrentUser, ModalTrigger } from 'meteor/nova:core';
import { Components, registerComponent, ModalTrigger } from 'meteor/nova:core';
import Movies from '../modules/collection.js';

class MoviesItem extends Component {
Expand Down Expand Up @@ -63,4 +63,4 @@ class MoviesItem extends Component {

}

registerComponent('MoviesItem', MoviesItem, withCurrentUser);
registerComponent('MoviesItem', MoviesItem);
1 change: 0 additions & 1 deletion packages/nova-categories/lib/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const specificResolvers = {
Post: {
async categories(post, args, context) {
if (post.categories) {
console.log(post.categories);
const categories = await context.BatchingCategories.find({_id: {$in: post.categories}}, { fields: context.getViewableFields(context.currentUser, context.Categories) });

return categories;
Expand Down
4 changes: 2 additions & 2 deletions packages/nova-core/lib/modules/containers/withDocument.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React, { PropTypes, Component } from 'react';
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
import { Utils, getFragment, getFragmentName } from 'meteor/nova:core';
import { getFragment, getFragmentName } from 'meteor/nova:core';

export default function withDocument (options) {

const { queryName, collection, pollInterval = 20000 } = options,
fragment = options.fragment || getFragment(options.fragmentName),
fragmentName = getFragmentName(fragment),
singleResolverName = collection.options.resolvers.single.name;
singleResolverName = collection.options.resolvers.single && collection.options.resolvers.single.name;

return graphql(gql`
query ${queryName}($documentId: String, $slug: String) {
Expand Down
4 changes: 2 additions & 2 deletions packages/nova-core/lib/modules/containers/withList.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ const withList = (options) => {
const { queryName, collection, limit = getSetting('postsPerPage', 10), pollInterval = 20000 } = options,
fragment = options.fragment || getFragment(options.fragmentName),
fragmentName = getFragmentName(fragment),
listResolverName = collection.options.resolvers.list.name,
totalResolverName = collection.options.resolvers.total.name;
listResolverName = collection.options.resolvers.list && collection.options.resolvers.list.name,
totalResolverName = collection.options.resolvers.total && collection.options.resolvers.total.name;


return compose(
Expand Down

0 comments on commit 03d5fe7

Please sign in to comment.