From b96b526b8206d65b9ef97e2ace7457b84048a90c Mon Sep 17 00:00:00 2001 From: lalitdeore Date: Thu, 15 Feb 2024 10:54:29 +0530 Subject: [PATCH 1/2] Fix: Ensured newaction.returns.example is defined before accessing it --- frontend/src/views/AngularWorkflow.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index fa90a3d1..c40a845a 100755 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -8588,13 +8588,15 @@ const AngularWorkflow = (defaultprops) => { // Further checks if those fields are already set in a previously used action newSelectedAction = RunAutocompleter(newSelectedAction); - if ( - newaction.returns.example !== undefined && - newaction.returns.example !== null && - newaction.returns.example.length > 0 - ) { - newSelectedAction.example = newaction.returns.example; - } + // Ensured newaction.returns is defined before accessing newaction.returns.example. +if ( + newaction.returns && + newaction.returns.example !== undefined && + newaction.returns.example !== null && + newaction.returns.example.length > 0 +) { + newSelectedAction.example = newaction.returns.example; +} if ( newaction.description !== undefined && From e04864d6ba351eb8d5452dab14c2409a0def7623 Mon Sep 17 00:00:00 2001 From: lalitdeore Date: Thu, 15 Feb 2024 11:40:32 +0530 Subject: [PATCH 2/2] Revert "Merge branch 'main' of https://github.com/Shuffle/Shuffle" This reverts commit 268ac2d2f6032763d21eccba7f2081858d5beff7, reversing changes made to b96b526b8206d65b9ef97e2ace7457b84048a90c. --- frontend/src/views/SettingsPage.jsx | 65 ++--------------------------- 1 file changed, 4 insertions(+), 61 deletions(-) diff --git a/frontend/src/views/SettingsPage.jsx b/frontend/src/views/SettingsPage.jsx index be99104c..2b0c1ebd 100755 --- a/frontend/src/views/SettingsPage.jsx +++ b/frontend/src/views/SettingsPage.jsx @@ -13,11 +13,6 @@ import { //import { useAlert import { ToastContainer, toast } from "react-toastify" -import { FileCopy, Visibility, VisibilityOff } from "@mui/icons-material"; -import IconButton from "@mui/material/IconButton"; -import { Tooltip } from "@mui/material"; - - const Settings = (props) => { const { globalUrl, isLoaded, userdata, setUserData } = props; //const alert = useAlert(); @@ -49,17 +44,6 @@ const Settings = (props) => { const [userSettings, setUserSettings] = useState({}); - const [showApiKey, setShowApiKey] = useState(false); - const [apiKeyCopied, setApiKeyCopied] = useState(false); - - const handleCopyApiKey = () => { - navigator.clipboard.writeText(userSettings.apikey); - setApiKeyCopied(true); - setTimeout(() => { - setApiKeyCopied(false); - }, 2000); - } - /* const [userdata.eth_info, setEthInfo] = useState(userdata.eth_info !== undefined && userdata.eth_info.account !== undefined && userdata.eth_info.account.length > 0 ? userdata.eth_info : { "account": "", @@ -483,7 +467,7 @@ const Settings = (props) => { > What is the API key used for? - {/* { id="standard-required" margin="normal" variant="outlined" - /> */} - - - setShowApiKey(!showApiKey)} - > - {showApiKey ? : } - - - - - - - - - ), - }} - color="primary" - value={showApiKey ? userSettings.apikey : '*'.repeat(36)} // Show API key if showApiKey is true, else show asterisks - required - disabled - fullWidth - placeholder="APIKEY" - id="standard-required" - margin="normal" - variant="outlined" - /> + />

{passwordFormMessage}

- {isCloud && ( - <> - -

Creator Incentive Program

- - )} - + +

Creator Incentive Program

{isCloud ?