Fixed undo/redo button className memory leak

Class `disabled` was added infinitely in the setupButton function.