Reputation: 21617
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
Upvotes: 2
Views: 801
Reputation: 544
The x attribute can't be reached because your location variable is null
Upvotes: 1