Skip to content

Commit

Permalink
AI Forms: Fix check for inline extensions availability (#37758)
Browse files Browse the repository at this point in the history
* AI Form: Check for inline extensions flag instead support

* changelog
  • Loading branch information
renatoagds authored Jun 7, 2024
1 parent 2321a04 commit ab738c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: other

Use correct const to check for inline extensions availability
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import React from 'react';
* Internal dependencies
*/
import { getFeatureAvailability } from '../../lib/utils/get-feature-availability';
import { AI_ASSISTANT_SUPPORT_NAME } from '../ai-assistant';
import { AI_ASSISTANT_EXTENSIONS_SUPPORT_NAME } from '../ai-assistant';
import AiAssistantBar from './components/ai-assistant-bar';
import AiAssistantToolbarButton from './components/ai-assistant-toolbar-button';
import { isJetpackFromBlockAiCompositionAvailable } from './constants';
Expand Down Expand Up @@ -194,7 +194,7 @@ function jetpackFormWithAiSupport( settings, name: string ) {
}

// Disable if Inline Extension is enabled
if ( getFeatureAvailability( AI_ASSISTANT_SUPPORT_NAME ) ) {
if ( getFeatureAvailability( AI_ASSISTANT_EXTENSIONS_SUPPORT_NAME ) ) {
return settings;
}

Expand Down Expand Up @@ -270,7 +270,7 @@ function jetpackFormChildrenEditWithAiSupport( settings, name ) {
}

// Disable if Inline Extension is enabled
if ( getFeatureAvailability( AI_ASSISTANT_SUPPORT_NAME ) ) {
if ( getFeatureAvailability( AI_ASSISTANT_EXTENSIONS_SUPPORT_NAME ) ) {
return settings;
}

Expand Down

0 comments on commit ab738c0

Please sign in to comment.