How to distinguish between an event of closing the last step popup and pressing ‘done’ in intro.js?

I am using intro.js version 4.3.0. The problem is that for some reason oncomplete gets triggered both when closing the last step (with a close button) and when pressing ‘Done’. Is there any way to distinct between those two events inside the oncomplete function?