How to find clipped groups without a fill?
There are two objects on the artboard: a simple rectangle on the left and a clipping group on the right. Inside the clipping group (which is created in the program with the command: Clipping mask -> Make) is a simple rectangle with a stroke.
The clipping mask object has no fill! Both objects are just selected, it's not a group. 
I want to find clipping groups that have no fill, like the one shown on the right.
However, this code finds two objects that fit this condition. Why not just one?
var arrayNoFill = [];
for (var i = 0; i < newLayer.pageItems.length; i++) {
var item = newLayer.pageItems[i];
if (item.typename === "PathItem") {
continue;
}
if (item.typename === "GroupItem" && item.clipped) {
var clippingMask = null;
for (var j = 0; j < item.pageItems.length; j++) {
var subItem = item.pageItems[j];
if (subItem.clipping) {
clippingMask = subItem;
}
if (clippingMask) {
var hasFillColor = clippingMask.filled;
alert("Is filled clipping mask? — " + (hasFillColor ? "Yes." : "No."));
if (!hasFillColor) {
arrayNoFill.push(item);
}
}
}
}
}
if (arrayNoFill && arrayNoFill.length > 0) {
alert('arrayNoFill length:' + arrayNoFill.length);
} else {
alert('arrayNoFill is empty');
}
