fix: guard Drawfast tool with feature flag in overrides
Drawfast was always included in overrides.tsx but is conditional in Board.tsx (dev-only). This caused "l is not a function" errors when users tried to select tools in production since the Drawfast tool wasn't registered. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
486e75d02a
commit
00aa0828c4
|
|
@ -34,6 +34,7 @@ import { llm, getApiKey } from "@/utils/llmUtils"
|
|||
const IS_PRODUCTION = import.meta.env.PROD
|
||||
const ENABLE_WORKFLOW = !IS_PRODUCTION // Workflow blocks - dev only
|
||||
const ENABLE_CALENDAR = !IS_PRODUCTION // Calendar - dev only
|
||||
const ENABLE_DRAWFAST = !IS_PRODUCTION // Drawfast - dev only
|
||||
|
||||
export const overrides: TLUiOverrides = {
|
||||
tools(editor, tools) {
|
||||
|
|
@ -227,6 +228,8 @@ export const overrides: TLUiOverrides = {
|
|||
readonlyOk: true,
|
||||
onSelect: () => editor.setCurrentTool("VideoGen"),
|
||||
},
|
||||
// Drawfast - only available in dev (must match ENABLE_DRAWFAST flag in Board.tsx)
|
||||
...(ENABLE_DRAWFAST ? {
|
||||
Drawfast: {
|
||||
id: "Drawfast",
|
||||
icon: "tool-pencil",
|
||||
|
|
@ -235,6 +238,7 @@ export const overrides: TLUiOverrides = {
|
|||
readonlyOk: true,
|
||||
onSelect: () => editor.setCurrentTool("Drawfast"),
|
||||
},
|
||||
} : {}),
|
||||
Multmux: {
|
||||
id: "Multmux",
|
||||
icon: "terminal",
|
||||
|
|
|
|||
Loading…
Reference in New Issue