Is there any way to determine if it is defined window.location.hash?
window.location.hash
If it is set, I get the value of the variable and use it to display additional content on the page.
if(window.location.hash) { // do stuff! }
What about:
if(window.location.hash !== '') { }
or
if(typeof window.location.hash !== 'undefined') { //your code }
Source: https://habr.com/ru/post/1773427/More articles:Rotate UIBarButtonItem - objective-cGame Rubber Band and Pegs - algorithmHow to save user input when Jeditable ajax post fails - jqueryHow to set FAT32 short names in Powershell or Windows Management Shell - fat32What is the difference between NtCreateProcess and ZwCreateProcess? - nativeSSL configuration apache django - djangoMac OS: uninstalling an old erlang installation - erlangFixng unused formal parameter warnings without creating an abstract class - c ++Getting the exact location using CLLocationManager - iosHow to remove erlang r16b from mac os x - erlangAll Articles