diff --git a/package/utils/cli/files/usr/share/ucode/cli/object-editor.uc b/package/utils/cli/files/usr/share/ucode/cli/object-editor.uc index 0a447540644..1f36ee9d074 100644 --- a/package/utils/cli/files/usr/share/ucode/cli/object-editor.uc +++ b/package/utils/cli/files/usr/share/ucode/cli/object-editor.uc @@ -135,8 +135,14 @@ export function remove_call(ctx, argv, named) if (!data) continue; - for (let idx in val) + for (let idx in val) { + if (idx != "" + +idx) { + let cur_idx = index(data, idx); + if (cur_idx >= 0) + idx = cur_idx + 1; + } data[+idx - 1] = null; + } cur_obj[name] = filter(data, (v) => v != null); if (cur.attribute_allow_empty && !length(cur_obj[name]))