Commit 6d12208f authored by tom's avatar tom

remove str.at() - not working in safari 14

parent b16be1a1
...@@ -26,7 +26,7 @@ import appConfig from 'configs/app/config'; ...@@ -26,7 +26,7 @@ import appConfig from 'configs/app/config';
// ]).replaceAll('"', '\''); // ]).replaceAll('"', '\'');
const stripTrailingSlash = (str: string) => str[str.length - 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 addLeadingSlash = (str: string) => str[0] === '/' ? str : '/' + str;
const networkExplorers: Array<NetworkExplorer> = (() => { const networkExplorers: Array<NetworkExplorer> = (() => {
return appConfig.network.explorers.map((explorer) => ({ return appConfig.network.explorers.map((explorer) => ({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment