How to make .endswith work in OS 11 chrome and safari?

136 views Asked by At

  const trimEnd = str => str.endsWith('/') ? str.slice(0, -1) :
                            str;


                        const filterWithValue = str => str.length;

Why wouldnt this work on a OS Big Sur chrome or Safari browser, but on windows or an ios 10 and below? How can I solve

I have a piece of code that works fine on OS10 browsers (chrome, safari, firefox) but not on os11 big sur browsers? Seems very odd since these are modern?

0

There are 0 answers