Tidy up by using optional chaining
This commit is contained in:
parent
26c952b9a2
commit
aec7cb9cc6
|
@ -4,9 +4,8 @@
|
||||||
import { notifier } from "builderStore/store/notifications"
|
import { notifier } from "builderStore/store/notifications"
|
||||||
import Flowchart from "./flowchart/FlowChart.svelte"
|
import Flowchart from "./flowchart/FlowChart.svelte"
|
||||||
|
|
||||||
$: workflow =
|
$: workflow = $workflowStore.selectedWorkflow?.workflow
|
||||||
$workflowStore.selectedWorkflow && $workflowStore.selectedWorkflow.workflow
|
$: workflowLive = workflow?.live
|
||||||
$: workflowLive = workflow && workflow.live
|
|
||||||
$: instanceId = $backendUiStore.selectedDatabase._id
|
$: instanceId = $backendUiStore.selectedDatabase._id
|
||||||
|
|
||||||
function onSelect(block) {
|
function onSelect(block) {
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
|
|
||||||
const { open, close } = getContext("simple-modal")
|
const { open, close } = getContext("simple-modal")
|
||||||
|
|
||||||
$: selectedWorkflowId =
|
$: selectedWorkflowId = $workflowStore.selectedWorkflow?.workflow?._id
|
||||||
$workflowStore.selectedWorkflow &&
|
|
||||||
$workflowStore.selectedWorkflow.workflow._id
|
|
||||||
|
|
||||||
function newWorkflow() {
|
function newWorkflow() {
|
||||||
open(
|
open(
|
||||||
|
|
Loading…
Reference in New Issue