Skip to content

Commit b3fbb41

Browse files
committed
strip of setOutput function before saving output node
1 parent 1aba5fd commit b3fbb41

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/components/molecules/flow/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ const Flow = ({ tabId, collectionId, flowData }) => {
109109
tab.isDirty = true;
110110
tab.flowData = {
111111
nodes: nodes.map((node) => {
112-
return { ...node };
112+
const _node = JSON.parse(JSON.stringify(node));
113+
return { ..._node };
113114
}),
114115
edges: edges.map((edge) => {
115116
return {
@@ -153,7 +154,7 @@ const Flow = ({ tabId, collectionId, flowData }) => {
153154
if (isEqual(nodes, []) && isEqual(edges, [])) {
154155
return;
155156
}
156-
if (flowData && isEqual(nodes, flowData.nodes) && isEqual(edges, flowData.edges)) {
157+
if (flowData && isEqual(JSON.parse(JSON.stringify(nodes)), flowData.nodes) && isEqual(edges, flowData.edges)) {
157158
console.debug('canvas is unchanged');
158159
return;
159160
}

src/components/molecules/flow/nodes/EvaluateNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const operatorMenu = (data) => {
2323
<select
2424
onChange={handleOperatorSelection}
2525
name='auth-type'
26-
default={selectedOperatorValue}
26+
value={selectedOperatorValue}
2727
className='w-full h-12 px-1 py-2 border rounded-md border-neutral-500 text-neutral-500 outline-0 focus:ring-0'
2828
>
2929
<option value={CHOOSE_OPERATOR_DEFAULT_VALUE_OBJ.value}>

src/stores/CollectionStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ const useCollectionStore = create((set, get) => ({
248248

249249
if (item) {
250250
item.modifiedAt = Date.now();
251-
console.log(`Collection updated: ${JSON.stringify(collection)}`);
251+
// console.log(`Collection updated: ${JSON.stringify(collection)}`);
252252

253253
// check if there are any open tabs, if yes mark them saved
254254
const tab = useTabStore.getState().tabs.find((t) => t.id === item.id);

0 commit comments

Comments
 (0)