Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Merge 003bfb2 into f1d4d53
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpalmer committed Aug 18, 2017
2 parents f1d4d53 + 003bfb2 commit c50525f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/connect.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import { connect as reduxConnect } from 'react-redux'
import { call } from 'redux-saga/effects';

import debug from './util/debug'
import contentTypesManager from './util/contentTypesManager'
Expand Down Expand Up @@ -32,7 +33,7 @@ export function identifier (displayName, id, props) {

/** Wrap `queryFn` in a function that takes the node-wpapi instance. */
export function wrapQueryFn (queryFn, props, state) {
return (wpapi) => queryFn(wpapi, props, state)
return function * (wpapi) { yield call(queryFn, wpapi, props, state) }
}

/** Wrap component in react-redux connect. */
Expand Down

0 comments on commit c50525f

Please sign in to comment.