diff --git a/src/PostSelector.js b/src/PostSelector.js index ee40db5..1e849ca 100644 --- a/src/PostSelector.js +++ b/src/PostSelector.js @@ -284,7 +284,7 @@ class PostSelector extends Component { } // check if we have the source post types from the API - if (!sourcePostTypes) { + if (sourcePostTypes == null) { return; } @@ -312,7 +312,7 @@ class PostSelector extends Component { } render() { - this.resolvePostTypes(sourcePostTypes); + this.resolvePostTypes(this.props.sourcePostTypes); const { autoFocus = true, instanceId, limit } = this.props; const { showSuggestions, posts, selectedSuggestion, loading, input } = this.state; const inputDisabled = !!limit && this.props.posts.length >= limit; @@ -320,7 +320,7 @@ class PostSelector extends Component { return ( {this.renderSelectedPosts()} -
+
@@ -344,15 +344,15 @@ class PostSelector extends Component { {showSuggestions && !!posts.length && ( -
+
{posts.map((post, index) => (