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

Emptying the yaml editor throws an exception #6

Open
wccbuck opened this issue Feb 24, 2024 · 1 comment
Open

Emptying the yaml editor throws an exception #6

wccbuck opened this issue Feb 24, 2024 · 1 comment

Comments

@wccbuck
Copy link

wccbuck commented Feb 24, 2024

While working with a YamlEditor component within a NextJS project running in development mode, any time I delete all text from the editor window, an error is thrown:

Error: merge function should return object with "text" or "json" fields

Call Stack
getMergedValue
node_modules/@focus-reactive/react-yaml/dist/YamlEditor.js (94:0)
eval
node_modules/@focus-reactive/react-yaml/dist/YamlEditor.js (131:0)
updateMemo
node_modules/react-dom/cjs/react-dom.development.js (17246:0)
Object.useMemo
node_modules/react-dom/cjs/react-dom.development.js (17886:0)
Object.useMemo
node_modules/react/cjs/react.development.js (1650:0)
YamlEditor
node_modules/@focus-reactive/react-yaml/dist/YamlEditor.js (130:0)
@wccbuck
Copy link
Author

wccbuck commented Feb 24, 2024

Looks like the bug was introduced in v1.1.0. I will use 1.0.0 for now. I'm just going to make my own thing with CodeMirror, this component is not functional.

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

No branches or pull requests

1 participant