summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--js/reveal.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 8110afc..25f0dcf 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3778,10 +3778,12 @@
*/
function onPreviewLinkClicked( event ) {
- var url = event.target.getAttribute( 'href' );
- if( url ) {
- showPreview( url );
- event.preventDefault();
+ if( event.currentTarget && event.currentTarget.hasAttribute( 'href' ) ) {
+ var url = event.currentTarget.getAttribute( 'href' );
+ if( url ) {
+ showPreview( url );
+ event.preventDefault();
+ }
}
}