mentie 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/modules/environment.js +1 -1
- package/package.json +1 -1
package/modules/environment.js
CHANGED
|
@@ -21,7 +21,7 @@ env.is_web = () => typeof window !== 'undefined'
|
|
|
21
21
|
*
|
|
22
22
|
* @returns {boolean} True if running in a web browser and the URL includes 'localhost', otherwise false.
|
|
23
23
|
*/
|
|
24
|
-
env.is_localhost = () => env.is_web() && `${ location.href }`.includes(
|
|
24
|
+
env.is_localhost = () => env.is_web() && [ 'localhost', '127.0.0.1', '::1' ].some( host => `${ location.href }`.includes( host ) )
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Checks if the code is running in the Cypress testing environment within a web browser.
|