PluginProbe
Extendify / trunk
Extendify vtrunk
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/workflows/block-selector/tools/get-block-content.js +3 -2 3.0.5 → trunk View file →
@@ -1,9 +1,10 @@
1 -import { useWorkflowStore } from '@agent/state/workflows';
1 +import { useQuickEditStore } from '@quick-edit/state/store';
2 2 import apiFetch from '@wordpress/api-fetch';
3 3
4 4 export default async () => {
5 - const { block } = useWorkflowStore.getState();
5 + const block = useQuickEditStore.getState().agentBlock;
6 + if (!block?.id) return { previousContent: '' };
6 7 const { postId } = window.extAgentData.context;
7 8 const response = await apiFetch({
8 9 path: `/extendify/v1/agent/get-block-code?postId=${postId}&blockId=${block.id}`,
9 10 });