Cssnano: TypeError: Cannot read property 'search' of undefined

Created on 18 Oct 2018  路  7Comments  路  Source: cssnano/cssnano

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

image

I guess it can be caused by the following code:

https://github.com/cssnano/cssnano/blob/1ebc3192629adbcb0e513452b4a9c1035730081e/packages/postcss-merge-longhand/src/lib/decl/borders.js#L376-L379

bug

Most helpful comment

Will look at this after work.

All 7 comments

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

@andyjansson online demo

@andyjansson find:

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

Will look at this after work.

Looking forward to the release of a new version :smile:

@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);

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bernhardreiter picture bernhardreiter  路  7Comments

djmtype picture djmtype  路  6Comments

GrimLink picture GrimLink  路  7Comments

daviestar picture daviestar  路  7Comments

zhangchao828 picture zhangchao828  路  8Comments