mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 16:28:59 +00:00
[Glitch] Use helpers to check environment in frontend (#2571)
Port 277e6968f5 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import type {
|
||||
import { createBrowserHistory } from 'history';
|
||||
|
||||
import { layoutFromWindow } from 'flavours/glitch/is_mobile';
|
||||
import { isDevelopment } from 'flavours/glitch/utils/environment';
|
||||
|
||||
interface MastodonLocationState {
|
||||
fromMastodon?: boolean;
|
||||
@@ -40,7 +41,7 @@ function normalizePath(
|
||||
} else if (
|
||||
location.state !== undefined &&
|
||||
state !== undefined &&
|
||||
process.env.NODE_ENV === 'development'
|
||||
isDevelopment()
|
||||
) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user