Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
try waiting to unlock Tabs
  • Loading branch information
chad1008 committed Dec 5, 2023
commit e0a7f53a44684019b8cba60ffd924f1b11e5d7b3
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