We set global msg variable at beforeinstallprompt event. However beforeinstallprompt isn't fired if the user already installed the app, and in that case, clicking install btn causes msg.prompt() call with nulled msg. I think that caused #53
This PR fixes the above situation. With this change we show the Install PWA button only when the app is ready to install, and hide it otherwise.
We set global
msg
variable atbeforeinstallprompt
event. Howeverbeforeinstallprompt
isn't fired if the user already installed the app, and in that case, clicking install btn causesmsg.prompt()
call withnull
edmsg
. I think that caused #53This PR fixes the above situation. With this change we show the
Install PWA
button only when the app is ready to install, and hide it otherwise.closes #53