mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Avoid a Javascript error when @tag is null
As it was pointed out in https://github.com/openSUSE/osem/pull/1142 if @tag is null there is an error in the Console when trying to take the user to the current day and time.
This commit is contained in:
parent
22a3f614a3
commit
cc4930c120
1 changed files with 4 additions and 1 deletions
|
|
@ -61,5 +61,8 @@
|
|||
|
||||
// Go to current date and time
|
||||
$(document).ready(function(){
|
||||
document.getElementById("#{ @tag }").scrollIntoView();
|
||||
tag = "#{ @tag }";
|
||||
if(tag !== ""){
|
||||
document.getElementById(tag).scrollIntoView();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue