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

modular-css-svelte explodes on empty CSS files #512

Closed
tivac opened this issue Aug 28, 2018 · 1 comment
Closed

modular-css-svelte explodes on empty CSS files #512

tivac opened this issue Aug 28, 2018 · 1 comment
Assignees

Comments

@tivac
Copy link
Owner

@tivac tivac commented Aug 28, 2018

[!] (svelte plugin) TypeError: Cannot read property 'join' of undefined
menu\pages\play\components\character-portrait.html
TypeError: Cannot read property 'join' of undefined
    at content.replace.replace (~~~node_modules\modular-css-svelte\src\markup.js:25:72)
    at String.replace (<anonymous>)
    at updateCss (~~~node_modules\modular-css-svelte\src\markup.js:23:10)
    at extractLink (~~~node_modules\modular-css-svelte\src\markup.js:87:12)
    at <anonymous>

(match, prefix, key, suffix) => `${prefix}"${exported[key].join(" ")}"${suffix}`

Looks like it isn't checking to be sure that exported[key] exists before trying to .join() it, not currently sure how it's even matching given that exported should be empty.

@tivac tivac self-assigned this Aug 28, 2018
@tivac
Copy link
Owner Author

@tivac tivac commented Aug 29, 2018

Turns out it generates a nonsense regex!

(\b)css\.()(\b) matches all sorts of things, but always calls the callback w/ an empty key param so of course looking that up doesn't go anywhere helpful.

tivac added a commit that referenced this issue Aug 29, 2018
Fixes #512
@tivac tivac closed this in #513 Aug 29, 2018
tivac added a commit that referenced this issue Aug 29, 2018
Fixes #512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant