I'm not sure whether one of my upstream plugins is messing with my declaration raws (probably is the case), but the issue for me was an empty node.raws, so the cloned node's "before," "after," and "between" raw props were all getting instantiated as "undefined" in the "safeCopyDeclarations" function. This fix just checks to make sure node.raws has each property before assigning them to the cloned node.
Sorry for the delay, looks good. I'll get it pushed up to NPM (hopefully later today) when I chance to make a test or two that would break in the previous version.
I was getting this weird error while extending from within a @media declaration. Using the readme example, I put in this:
which was being output as:
I'm not sure whether one of my upstream plugins is messing with my declaration raws (probably is the case), but the issue for me was an empty node.raws, so the cloned node's "before," "after," and "between" raw props were all getting instantiated as "undefined" in the "safeCopyDeclarations" function. This fix just checks to make sure node.raws has each property before assigning them to the cloned node.
Let me know if this looks alright; thanks!