The problem was that the function itself was declared before the initialization of button that wasn’t working.
So the replacing of button init before the function declaration resolved the issue.
The problem was that the function itself was declared before the initialization of button that wasn’t working.
So the replacing of button init before the function declaration resolved the issue.