Script performing click action even my button is disabled

My test case is to click on share button in my app

When user navigates to page share button is displayed (but with disabled state) it took some time to enable

as soon as button displayed script executing that click operation and scripts fails

any help how to wait for element enabling(except waits)