remove classname from edges on import
This commit is contained in:
parent
1cdc0b5161
commit
19d5445813
1 changed files with 2 additions and 1 deletions
|
|
@ -85,6 +85,7 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
if (cookie && Object.keys(templates).length > 0) {
|
if (cookie && Object.keys(templates).length > 0) {
|
||||||
let cookieObject: LangFlowState = JSON.parse(cookie);
|
let cookieObject: LangFlowState = JSON.parse(cookie);
|
||||||
cookieObject.flows.forEach((flow) => {
|
cookieObject.flows.forEach((flow) => {
|
||||||
|
flow.data.edges.forEach((edge) => {edge.className = "";})
|
||||||
flow.data.nodes.forEach((node) => {
|
flow.data.nodes.forEach((node) => {
|
||||||
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
||||||
node.data.node.base_classes =
|
node.data.node.base_classes =
|
||||||
|
|
@ -285,8 +286,8 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
// Get data from the flow or set it to null if there's no flow provided.
|
// Get data from the flow or set it to null if there's no flow provided.
|
||||||
const data = flow?.data ? flow.data : null;
|
const data = flow?.data ? flow.data : null;
|
||||||
const description = flow?.description ? flow.description : "";
|
const description = flow?.description ? flow.description : "";
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
data.edges.forEach((edge) => {edge.className = "";})
|
||||||
data.nodes.forEach((node) => {
|
data.nodes.forEach((node) => {
|
||||||
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
||||||
node.data.node.base_classes =
|
node.data.node.base_classes =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue