Update toaster.js

This check is required so if tap-to-dismiss is false and close-button is true you still can use close button, otherwise you can add the button but it will not work