Files
MajoorWaldi-ComfyUI-Majoor-…/ui/stores/getOptionalPanelStore.ts
T

12 lines
264 B
TypeScript

import { getActivePinia } from "pinia";
import { usePanelStore } from "./usePanelStore.js";
export function getOptionalPanelStore() {
try {
if (!getActivePinia()) return null;
return usePanelStore();
} catch {
return null;
}
}