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

tivac opened this issue Aug 28, 2018 · 1 comment


None yet
1 participant
Copy link

commented Aug 28, 2018

[!] (svelte plugin) TypeError: Cannot read property 'join' of undefined
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


This comment has been minimized.

Copy link
Owner Author

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

@tivac tivac closed this in #513 Aug 29, 2018

tivac added a commit that referenced this issue Aug 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.