It looks like the command var styles = $(this).html().match(/@import url\(['"](.*)['"]\)/gi); returns an object that contains all the css files as strings plus a function called "remove". And because of that function in the array the subsequent for loop failes.

I've attached a patch that resolves that issue.

CommentFileSizeAuthor
css.js_.patch565 bytesjurgenhaas

Comments

guybedford’s picture

Status: Active » Patch (to be ported)

Thanks for your debugging efforts!

It sounds like in your code the Array prototype has been extended (which is perfectly valid actually - it's the Object prototype being extended that you worry about).

guybedford’s picture

Status: Patch (to be ported) » Closed (fixed)

Thanks again Jurgen, I have included this update in the latest version (2.0).