diff --git a/docs/index.html b/docs/index.html
index 6b2dbae3f8a016..9d95d16a44b245 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -93,12 +93,10 @@
link.setAttribute( 'target', 'viewer' );
link.addEventListener( 'click', function ( event ) {
- if ( event.button === 0 && !event.ctrlKey && !event.altKey && !event.metaKey ) {
+ if ( event.button !== 0 || event.ctrlKey || event.altKey || event.metaKey ) return;
- window.location.hash = pageURL;
- panel.classList.add( 'collapsed' );
-
- }
+ window.location.hash = pageURL;
+ panel.classList.add( 'collapsed' );
} );
diff --git a/examples/index.html b/examples/index.html
index fcf94317fa3a8d..bf318293f02f43 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -296,11 +296,9 @@
link.setAttribute( 'target', 'viewer' );
link.addEventListener( 'click', function ( event ) {
- if ( event.button === 0 && !event.ctrlKey && !event.altKey && !event.metaKey ) {
+ if ( event.button !== 0 || event.ctrlKey || event.altKey || event.metaKey ) return;
- selectFile( file );
-
- }
+ selectFile( file );
} );