`delete` only removes properties from objects.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete

you want to `null` out the element