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

TypeError: Cannot read property 'search' of undefined #639

Closed
PanJiaChen opened this issue Oct 18, 2018 · 7 comments
Closed

TypeError: Cannot read property 'search' of undefined #639

PanJiaChen opened this issue Oct 18, 2018 · 7 comments
Labels

Comments

@PanJiaChen
Copy link

When I upgrade to v4.1.5, the following error occurs.

image

I guess it can be caused by the following code:

const wscProp = rules.filter(r => r !== lastNode)[0];
if (!isValueCustomProp(values[i]) || isCustomProp(wscProp)) {
return;
}

@andyjansson
Copy link
Contributor

Can you provide a minimal set of code to reproduce the issue?

@PanJiaChen
Copy link
Author

@andyjansson online demo

@alexander-akait
Copy link
Member

@andyjansson find:

.a {
    border: 2px solid #fff;
    border-color: inherit;
}

@andyjansson
Copy link
Contributor

Will look at this after work.

@PanJiaChen
Copy link
Author

PanJiaChen commented Oct 19, 2018

Looking forward to the release of a new version 😄

@unlinking
Copy link

@andyjansson

postcss-merge-longhand installed from npm,

"version": "4.0.7"

borders.js line 106 seems to be old, missing fixed code, something wrong ???

const isValueCustomProp = value => !!~value.search(/var\s*(\s*--/i);

@andyjansson
Copy link
Contributor

@lulucas It was merged yesterday. It hasn't been published yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants