Added null propagation operators
This commit is contained in:
parent
fe4b5502d4
commit
f9ed72f670
|
@ -38,17 +38,19 @@
|
||||||
|
|
||||||
function updateEditorsOnDelete(deleteIndex) {
|
function updateEditorsOnDelete(deleteIndex) {
|
||||||
for (let i = deleteIndex; i < query.fields.steps?.length - 1; i++) {
|
for (let i = deleteIndex; i < query.fields.steps?.length - 1; i++) {
|
||||||
stepEditors[i].update(query.fields.steps[i + 1].value.value)
|
stepEditors[i].update(query.fields.steps[i + 1].value?.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function updateEditorsOnSwap(actionIndex, targetIndex) {
|
function updateEditorsOnSwap(actionIndex, targetIndex) {
|
||||||
const target = query.fields.steps[targetIndex].value.value
|
const target = query.fields.steps[targetIndex].value?.value
|
||||||
stepEditors[targetIndex].update(query.fields.steps[actionIndex].value.value)
|
stepEditors[targetIndex].update(
|
||||||
|
query.fields.steps[actionIndex].value?.value
|
||||||
|
)
|
||||||
stepEditors[actionIndex].update(target)
|
stepEditors[actionIndex].update(target)
|
||||||
}
|
}
|
||||||
|
|
||||||
function setEditorTemplate(fromKey, toKey, index) {
|
function setEditorTemplate(fromKey, toKey, index) {
|
||||||
const currentValue = query.fields.steps[index].value.value
|
const currentValue = query.fields.steps[index].value?.value
|
||||||
if (
|
if (
|
||||||
!currentValue ||
|
!currentValue ||
|
||||||
currentValue.toString().replace("\\s", "").length < 3 ||
|
currentValue.toString().replace("\\s", "").length < 3 ||
|
||||||
|
|
Loading…
Reference in New Issue