diff options
author | Guillaume Calmettes <guillaume.calmettes@gmail.com> | 2018-07-29 06:25:44 +0300 |
---|---|---|
committer | Guillaume Calmettes <guillaume.calmettes@gmail.com> | 2018-07-29 06:25:44 +0300 |
commit | 1ce51aff424151bfba325b0f8dbfbb23b9a0949b (patch) | |
tree | aa1d423f731c1c61489422268a933df9e4885c35 | |
parent | b34f0cbe01b05b971aad0ec36b8bf2438c45b111 (diff) |
correctly hide preview if item is the one being previewed
-rw-r--r-- | layouts/partials/scripts.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 4c95802..d0d1427 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -213,7 +213,7 @@ } ).children( 'a' ).on( 'click', function(e) { var $item = $( this ).parent(); - current === $item.index() ? hidePreview() : showPreview( $item ); + current === Array.from($items).findIndex(d => d == $item[0]) ? hidePreview() : showPreview( $item ); return false; } ); |