Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for 'copyWithLocations is not a function' bug #108

Draft
wants to merge 1 commit into
base: readiumCSS-v2
Choose a base branch
from

Conversation

bluefirepatrick
Copy link
Member

There is a bug in EpubNavigator.ts in syncLocation where it calls nearestPositions.first.copyWithLocations. On startup there are cases where the object nearestPositions.first exists but it has not had copyWithLocations added to it yet. This draft PR adds a private function, isFunctionOfObject, that can be used to check if this object exists. It then returns from syncLocation if the function doesn't exist. You may want to deal with the case in a different way but this should at least help demonstrate the issue.
Screenshot 2025-03-02 at 1 28 57 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant