postcss-custom-properties icon indicating copy to clipboard operation
postcss-custom-properties copied to clipboard

Error if no previous rule or declaration exists

Open jednano opened this issue 4 years ago • 2 comments

Error is thrown here when the rule is undefined:

https://github.com/postcss/postcss-custom-properties/blob/a250907b9ca0b336d6c0ca948a1db2fe2d145309/src/lib/is-ignored.js#L5

Fix should probably be implemented here to check if the rule exists before sending it to isBlockIgnored.

https://github.com/postcss/postcss-custom-properties/blob/a250907b9ca0b336d6c0ca948a1db2fe2d145309/src/lib/is-ignored.js#L11

jednano avatar Jun 03 '20 00:06 jednano

@jedmao could you provide css code example which generate this error?

Semigradsky avatar Sep 18 '20 08:09 Semigradsky

Unfortunately, I don’t remember the scenario. Can’t believe I didn’t include that here. Sorry.

jednano avatar Sep 18 '20 14:09 jednano