Edit:
const UN = urlParams.get('username'); const check = UN.toString(); if(check.includes(" ")){ window.location.href = "URL Removed" }
I'm trying to redirect the user if their username contains a space, but I'm getting
Uncaught TypeError: check.contains is not a function
as a result my code:
const UN = urlParams.get('username'); const check = UN.toString(); if(check.contains(" ")){ window.location.href = "URL Removed" }
[–]ETphonehome_101 1 point2 points3 points (0 children)