hocuspocus icon indicating copy to clipboard operation
hocuspocus copied to clipboard

Inaccurate document type check in onLoadDocument

Open aonnikov opened this issue 1 year ago • 0 comments

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 avatar Mar 01 '24 16:03 aonnikov