diff --git a/core/variables.ts b/core/variables.ts index 75f0c3cf88..5d60b475b1 100644 --- a/core/variables.ts +++ b/core/variables.ts @@ -92,6 +92,11 @@ export function allDeveloperVariables(workspace: Workspace): string[] { * @returns Array of XML elements. */ export function flyoutCategory(workspace: WorkspaceSvg): Element[] { + if (!Blocks['variables_set'] && !Blocks['variables_get']) { + console.warn( + 'There are no variable blocks, but there is a variable category.', + ); + } let xmlList = new Array(); const button = document.createElement('button'); button.setAttribute('text', '%{BKY_NEW_VARIABLE}'); diff --git a/core/variables_dynamic.ts b/core/variables_dynamic.ts index 8dc691d3a1..6722f8b49f 100644 --- a/core/variables_dynamic.ts +++ b/core/variables_dynamic.ts @@ -76,6 +76,11 @@ export const onCreateVariableButtonClick_Colour = colourButtonClickHandler; * @returns Array of XML elements. */ export function flyoutCategory(workspace: WorkspaceSvg): Element[] { + if (!Blocks['variables_set_dynamic'] && !Blocks['variables_get_dynamic']) { + console.warn( + 'There are no dynamic variable blocks, but there is a dynamic variable category.', + ); + } let xmlList = new Array(); let button = document.createElement('button'); button.setAttribute('text', Msg['NEW_STRING_VARIABLE']);