1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

fix environment detection regex

This commit is contained in:
brunobar79 2018-07-02 15:14:05 -04:00
parent 66b3b72c98
commit 451c05bcbb

View File

@ -28,7 +28,7 @@ function getStack () {
* *
*/ */
const getEnvironmentType = (url = window.location.href) => { const getEnvironmentType = (url = window.location.href) => {
if (url.match(/popup.html(?:\?.+)*$/)) { if (url.match(/popup.html(?:#.*)*$/)) {
return ENVIRONMENT_TYPE_POPUP return ENVIRONMENT_TYPE_POPUP
} else if (url.match(/home.html(?:\?.+)*$/) || url.match(/home.html(?:#.*)*$/)) { } else if (url.match(/home.html(?:\?.+)*$/) || url.match(/home.html(?:#.*)*$/)) {
return ENVIRONMENT_TYPE_FULLSCREEN return ENVIRONMENT_TYPE_FULLSCREEN