if (typeof (location.x != null) {
Using the above I run into the follow error: Uncaught TypeError: Cannot read property 'x' of null
I have tried console.log(location.x) which results in an example with null
if (location && location.x) {
}
You can just do:
if (location && location.x) {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With