fix safari 14 issues

This commit is contained in:
tom
2022-11-15 17:14:22 +03:00
parent a136ff62ca
commit d1fee3ed44
4 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ const parseEnvJson = <DataType>(env: string | undefined): DataType | null => {
return null;
}
};
const stripTrailingSlash = (str: string) => str.at(-1) === '/' ? str.slice(0, -1) : str;
const stripTrailingSlash = (str: string) => str[str.length - 1] === '/' ? str.slice(0, -1) : str;
const env = process.env.VERCEL_ENV || process.env.NODE_ENV;
const isDev = env === 'development';
+4
View File
@@ -123,6 +123,10 @@ function makePolicyMap() {
'fonts.googleapis.com',
],
'prefetch-src': [
...MAIN_DOMAINS,
],
'object-src': [
KEY_WORDS.NONE,
],
+1 -1
View File
@@ -16,7 +16,7 @@ import appConfig from 'configs/app/config';
// },
// ]).replaceAll('"', '\'');
const stripTrailingSlash = (str: string) => str.at(-1) === '/' ? str.slice(0, -1) : str;
const stripTrailingSlash = (str: string) => str[str.length - 1] === '/' ? str.slice(0, -1) : str;
const addLeadingSlash = (str: string) => str.at(0) === '/' ? str : '/' + str;
const networkExplorers: Array<NetworkExplorer> = (() => {
+1 -1
View File
@@ -15,7 +15,7 @@ export default function useAdaptiveTabs(tabs: Array<RoutedTab>, disabled?: boole
const calculateCut = React.useCallback(() => {
const listWidth = listRef.current?.getBoundingClientRect().width;
const tabWidths = tabsRefs.map((tab) => tab.current?.getBoundingClientRect().width);
const menuWidth = tabWidths.at(-1);
const menuWidth = tabWidths[tabWidths.length - 1];
if (!listWidth || !menuWidth) {
return tabs.length;