docsify-pagination icon indicating copy to clipboard operation
docsify-pagination copied to clipboard

Uncaught TypeError causing Sidebar Expansion to Break

Open d-marmalade opened this issue 3 years ago • 1 comments

I have a project using docsify, and it seems that the latest release of this plugin is breaking the sidebar expansion functionality.

Problem

When I run the site locally, sidebar expansion does not happen on click, and I encounter the following error in the console:

Uncaught TypeError: Cannot read properties of undefined (reading 'path')
  at k (docsify-pagination.min.js:1:4164)
  at i (docsify-pagination.min.js:1:6048)
  at o (docsify@4:1:107814)
  at o (docsify@4:1:107836)
  at o (docsify@4:1:107836)
  at docsify@4:1:107802
  at docsify-sidebar-collapse.min.js:1:4572
  at o (docsify@4:1:107782)
  at o (docsify@4:1:107836)
  at t.callHook (docsify@4:1:107852)

Workaround

Pinning docsify-pagination to v2.6.x (https://cdn.jsdeliver.net/npm/[email protected]/dist/docsify-pagination.min.js) fixes the issue.

Project State

This project is using:

  • docsify@4
  • docsify@4/lib/plugins/search.js
  • docsify-pagination
  • docsify-tabs@1
  • docsify-copy-code@2
  • docsify-sidebar-collapse
  • docsify/lib/plugins/zoom-image.min.js
  • prismjs@1

d-marmalade avatar Jun 27 '22 19:06 d-marmalade

Thanks for the feedback. There might be some optional chain protection missing. I just released 2.10.1, but I'm unsure if it's been fixed since I couldn't reproduce the issue. Could you help to confirm?

imyelo avatar Jun 28 '22 11:06 imyelo