Nodes not deleting

the nodes aren’t getting deleted what can be the issue :

check now

Modified code