Imagine a fault tree, that has OR gates (or AND, same issue) with just a single "leg" like for example this one:

There might be endless discussion whether this is correct FTA or mathematically correct or ... this is not part of this forum, hence we do not consider that for now. If you export this faul tree to FT+ it will complain that one-leg OR gates are forbidden and and this point in time you can use a simple script to "eliminate" (i.e. delete) these unnecessary OR gate.
In the attached script you find a simple solution that reuses one of the two connections (it uses actually the "incoming" connection from the downstream event (so the base event) and connects it to the upstream event, then deletes the gate. So the script requires the trashbin.js library.
The heart of the script is this snippet (there is more in the file):
...
// eliminate
gates.forEach(function fixgate(gate) {
console.log("Gate {0} has {1} inputs", gate.label, gate.children.size());
// traverse to the first (and only) input connection (down)
var input = gate.inputs.get(0);
// get the OUPUT node from the connector (the down stream node)
var down = input.outputNode;
// now get the first (and only) output connection (up)
var output = gate.outputs.get(0);
// get the OUPUT node from the connector (the down stream node)
var up = output.inputNode;
// reconnect the DOWN node to the UP node reusing the input connection
input.inputNode = up;
// delete the gate itself (and the other connection with it in one step)
Trashbin.deleteElement(gate);
});
...
Once executed, the FTA looks like this:

Any comments as usual are welcome
Happy Scripting.