Undefined is not an object (evaluating 'window.location.pathname.split')

on click of reactions icon in mobile getting the following warning.