diff --git a/src/libs/Environment/betaChecker/index.android.js b/src/libs/Environment/betaChecker/index.android.js index 22cfd024bdce..733f431e1553 100644 --- a/src/libs/Environment/betaChecker/index.android.js +++ b/src/libs/Environment/betaChecker/index.android.js @@ -11,11 +11,16 @@ function isBetaBuild() { fetch(CONST.PLAY_STORE_URL) .then(res => res.text()) .then((text) => { - const productionVersionMatch = text.match(/]+class="htlgb"[^>]*>([-\d.]+)<\/span>/); + const productionVersionSearch = text.match(/\[\[\["\d+\.\d+\.\d+/); + if (!productionVersionSearch) { + resolve(false); + } + + const productionVersion = productionVersionSearch[0].match(/\d+\.\d+\.\d+/); // If we have a match for the production version regex and the current version is not the same // as the production version, we are on a beta build - const isBeta = productionVersionMatch && productionVersionMatch[1].trim() !== version; + const isBeta = productionVersion && productionVersionSearch[0].trim() !== version; resolve(isBeta); }) .catch(() => {