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
svelte-cli version 1.0.2
consider the following template:
<input type="text" value="">
when compiling via
svelte compile --format iife helloWorld.html > helloWorld.js
the compiler crashes:
mer@ALANIS:/mnt/d/programming/sveltetest$ svelte compile --format iife helloWorld.html > helloWorld.js compiling helloWorld.html... /home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/node_modules/svelte/dist/svelte.js:6844 const value = ( attribute.value[0].type === 'Text' ? '' : `"" + ` ) + ( ^ TypeError: Cannot read property 'type' of undefined at node.attributes.forEach.attribute (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/node_modules/svelte/dist/svelte.js:6844:39) at Array.forEach (native) at addElementAttributes (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/node_modules/svelte/dist/svelte.js:6772:18) at Object.enter (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/node_modules/svelte/dist/svelte.js:7034:4) at visit (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/node_modules/svelte/dist/svelte.js:7512:33) at Array.forEach (native) at generate (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/node_modules/svelte/dist/svelte.js:7605:23) at Object.compile (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/node_modules/svelte/dist/svelte.js:7907:9) at compileFile (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/bin.js:611:26) at compile$1 (/home/mer/.nvm/versions/node/v6.3.1/lib/node_modules/svelte-cli/bin.js:576:3) mer@ALANIS:/mnt/d/programming/sveltetest$
UPDATE: the compiler does not crash when an additional placeholder for the value attribute is used:
<input type="text" value="{{foo}}">
The text was updated successfully, but these errors were encountered:
Thanks, will fix. Workaround in the meantime is to omit the empty attribute altogether
Sorry, something went wrong.
handle empty attributes in elements and components. fixes #63
7b15ff9
Merge pull request #71 from sveltejs/gh-63
1de8794
handle empty attributes in elements and components
Fixed in 1.0.4
lgtm!
Successfully merging a pull request may close this issue.
svelte-cli version 1.0.2
consider the following template:
when compiling via
the compiler crashes:
UPDATE:
the compiler does not crash when an additional placeholder for the value attribute is used:
The text was updated successfully, but these errors were encountered: