Fix product tab to be shown on production build (#35976)

This commit is contained in:
Maikel David Pérez Gómez 2022-12-14 18:07:55 -03:00 committed by GitHub
parent d0a464520d
commit 31e6f90e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import { TabPanel } from '@wordpress/components';
* Internal dependencies
*/
import './product-form-layout.scss';
import { ProductFormTab } from '../product-form-tab';
export const ProductFormLayout: React.FC< {
children: JSX.Element | JSX.Element[];
@ -26,7 +27,7 @@ export const ProductFormLayout: React.FC< {
}, [] );
const tabs = Children.map( children, ( child: JSX.Element ) => {
if ( child.type.name !== 'ProductFormTab' ) {
if ( child.type !== ProductFormTab ) {
return null;
}
return {
@ -46,7 +47,7 @@ export const ProductFormLayout: React.FC< {
<>
{ Children.map( children, ( child: JSX.Element ) => {
if (
child.type.name !== 'ProductFormTab' ||
child.type !== ProductFormTab ||
child.props.name !== tab.name
) {
return null;

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix product tab to be shown on production build