We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug It's not possible to save or update snippets when the code is empty. I wanna bookmark them to paste the code later.
Error: Unable to create snippet.
To Reproduce Steps to reproduce the behavior:
export default function (babel) { const { types: t } = babel; return { name: "ast-transform", // not required visitor: { VariableDeclarator(path) { const binding = path.scope.getBinding(path.node.id.name); if (!binding) return; if (!binding.constant) return; if (!t.isLiteral(path.node.init)) return; binding.referencePaths.forEach(ref => { ref.replaceWith(path.node.init); }); path.remove(); } } }; }
Expected behavior Successfully create a snippet
Screenshots
Browser (please complete the following information):
astexplorer settings:
@babel/parser
babelv7
explorerSettingsV1
{ "showTransformPanel": true, "parserSettings": {}, "parserPerCategory": { "javascript": "babylon7" }, "workbench": { "parser": "babylon7", "code": "", "keyMap": "default", "transform": { "code": "export default function (babel) {\n const { types: t } = babel;\n \n return {\n name: \"ast-transform\", // not required\n visitor: {\n VariableDeclarator(path) {\n const binding = path.scope.getBinding(path.node.id.name);\n if (!binding) return;\n if (!binding.constant) return;\n if (!t.isLiteral(path.node.init)) return;\n binding.referencePaths.forEach(ref => {\n ref.replaceWith(path.node.init);\n });\n path.remove();\n }\n }\n };\n}\n", "transformer": "babelv7" } } }
Additional context Response: 500 Internal Server Error - Something went wrong
Something went wrong
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
It's not possible to save or update snippets when the code is empty.
I wanna bookmark them to paste the code later.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Successfully create a snippet
Screenshots
Browser (please complete the following information):
astexplorer settings:
@babel/parser
babelv7
explorerSettingsV1
:Additional context
Response: 500 Internal Server Error -
Something went wrong
The text was updated successfully, but these errors were encountered: