typo, thanks @develCuy
alert instead of erroring when a window is missing