mirror of https://github.com/cncf/cncf.io.git
If the modal has no content then redirect to the permalink for the person (#902)
Signed-off-by: Chris Abraham <cjyabraham@gmail.com>
This commit is contained in:
parent
1da53b94d0
commit
16f1a84c9b
|
|
@ -95,6 +95,11 @@
|
|||
$modal_code += $modal_content.html();
|
||||
$modal_code += '</div>';
|
||||
$modal_content.empty();
|
||||
} else if ( $modal_slug !== '' ) {
|
||||
// if no modal content but slug is defined, redirect the page to the permalink for this person.
|
||||
var urlWithoutQueryString = window.location.origin + window.location.pathname;
|
||||
window.location.href = urlWithoutQueryString + '?p=' + $modal_slug;
|
||||
return;
|
||||
}
|
||||
$modal_code += '</div></div></' + $modal_tag + '>';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue