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

editor.currentData[path] blog.js is sometimes undefined #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hoxolotl
Copy link

@Hoxolotl Hoxolotl commented Apr 8, 2024

editor.currentData[path] blog.js is sometimes undefined, this leads to the save function to be blocked with the following error:

Uncaught TypeError: editor.currentData[path] is undefined
save https://www.vanuithandstand.nl/assets/js/blog-helper/blog.js:66
executeSave https://canary.simplyedit.io/1/simply-edit.js:26
mergeAndSave https://www.vanuithandstand.nl/cases/#simply-edit line 225 > injectedScript:29
onreadystatechange https://canary.simplyedit.io/1/simply-edit.js:332
blog.js:66:29
save https://www.vanuithandstand.nl/assets/js/blog-helper/blog.js:66
executeSave https://canary.simplyedit.io/1/simply-edit.js:26
mergeAndSave https://www.vanuithandstand.nl/cases/#simply-edit line 225 > injectedScript:29
onreadystatechange https://canary.simplyedit.io/1/simply-edit.js:332

Solved by defining a default if the object doesn't exist.

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.

None yet

1 participant