diff --git a/editor/components/post-taxonomies/flat-term-selector.js b/editor/components/post-taxonomies/flat-term-selector.js index b6d99a1783ebac..4b414f28bfd2c2 100644 --- a/editor/components/post-taxonomies/flat-term-selector.js +++ b/editor/components/post-taxonomies/flat-term-selector.js @@ -106,8 +106,13 @@ class FlatTermSelector extends Component { .then( resolve, ( xhr ) => { const errorCode = xhr.responseJSON && xhr.responseJSON.code; if ( errorCode === 'term_exists' ) { - return new Model( { id: xhr.responseJSON.data } ) - .fetch().then( resolve, reject ); + // search the new category created since last fetch + this.addRequest = new Model().fetch( + { data: { ...DEFAULT_QUERY, search: termName } } + ); + return this.addRequest.then( searchResult => { + resolve( find( searchResult, result => result.name === termName ) ); + }, reject ); } reject( xhr ); } );