Why does this function run twice on one click?

Printable View