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

Inaccurate document type check in onLoadDocument #795

Open
aonnikov opened this issue Mar 1, 2024 · 0 comments
Open

Inaccurate document type check in onLoadDocument #795

aonnikov opened this issue Mar 1, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@aonnikov
Copy link

aonnikov commented Mar 1, 2024

Description

We recently migrated to esbuild in our project and run into an issue with loading documents, all loaded documents were empty. After some debugging I figured out that the problem was in document class check in the onLoadDocument hook. When code is minified, symbols will be replaced (unless keepnames option is enabled) and Hocuspocus will stop loading documents. For now we solved the problem with enabling keepnames option, but it would be nice to rewrite this check to be more robust.

@aonnikov aonnikov added the bug Something isn't working label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants