fix: Respect MERMAID_IS_ENABLED_MERMAID_CHART_LINKS for popup

This commit is contained in:
Sidharth Vinod
2026-03-03 15:56:47 +05:30
parent bf1a7581e8
commit 13e5e834a2
@@ -1,3 +1,5 @@
import { env } from '$/util/env';
const mermaidAiDomain = 'mermaid.ai';
/**
@@ -46,6 +48,7 @@ const editorChooserStorageKey = 'mermaid-editor-chooser-dismissed';
* Shows for new users who haven't dismissed it and aren't viewing a shared link.
*/
export const shouldShowEditorChooser = (): boolean => {
if (!env.isEnabledMermaidChartLinks) return false;
if (window.localStorage.getItem(editorChooserStorageKey) === 'true') return false;
if (hasStoredUserData()) return false;
if (hasPakoData()) return false;