2
0

Use helpers to check environment in frontend (#27633)

This commit is contained in:
Renaud Chaput
2023-10-31 17:05:44 +01:00
committed by GitHub
parent 7ef56d6e50
commit 277e6968f5
8 changed files with 28 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ import type {
import { createBrowserHistory } from 'history';
import { layoutFromWindow } from 'mastodon/is_mobile';
import { isDevelopment } from 'mastodon/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(