Skip to content

Commit

Permalink
try waiting to unlock Tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
chad1008 committed Dec 5, 2023
1 parent 4b48fe1 commit e0a7f53
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import {
import { useSettings } from '../use-settings';
import { unlock } from '../../lock-unlock';

const { Tabs } = unlock( componentsPrivateApis );

const colorsAndGradientKeys = [
'colors',
'disableCustomColors',
Expand Down Expand Up @@ -109,6 +107,11 @@ function ColorGradientControlInner( {
</div>
);

// Unlocking `Tabs` too early causes the `unlock` method to receive an empty
// object, due to circular dependencies.
// See https://github.com/WordPress/gutenberg/issues/52692
const { Tabs } = unlock( componentsPrivateApis );

return (
<BaseControl
__nextHasNoMarginBottom
Expand Down

0 comments on commit e0a7f53

Please sign in to comment.