Electrical issues can cause damage to any part that is allowed to be in the electrical path. It is very important to place the ground clamp directly on the part being welded.
Electronics can be damaged by the electo magnetic field that occurs around all cables & the work piece when a tig or mig welding torch is powered up. Machines for both processes have capacitors in them that discharge when the arc is started, all wiring connected to electronics acts like antenna & can pick up & back feed a voltage spike by inductance from all & any magnetic fields that are in close proximity to the work being done. This can be problematic, & very expensive, due to ignoring these facts that most people never think about. Don't take chances, take it apart & perform the repair on a work bench AWAY from your bike, or any other electronic devices.
If the repair is done using oxygen/fuel process, expect any 2-stroke exhaust to go bang, at least once. Prepare for it, it WILL happen. DO NOT PLUG THE ENDS OF THE PART, THEY MUST BE LEFT OPEN TO VENT. Never weld on any thing that is a closed up vessel! Doing so is extremely dangerous & can result in fatality, this is no joke.
P.S. There is residue in side all 2-stroke pipes. Carbon, oil, UN-BURNED FUEL TOO, BEWARE! :yikes: