diff --git a/tests/Layer/test_Vector.html b/tests/Layer/test_Vector.html index a13f20a15d..a5bc98c99c 100644 --- a/tests/Layer/test_Vector.html +++ b/tests/Layer/test_Vector.html @@ -315,9 +315,15 @@ "given graphicHeight and graphicWidth, both are set: width"); feature.style = customStyle5; layer.drawFeature(feature); - var fill = root.firstChild.getElementsByTagName("fill")[0]; - if (fill == null) fill = root.firstChild.getElementsByTagName("v:fill"); - var opacity = fill.getAttribute('opacity'); + var fill = root.firstChild.getElementsByTagName("v:fill")[0]; + var opacity; + if(fill) { + opacity = fill.getAttribute('opacity'); + } + if(opacity === undefined) { + fill = root.firstChild.getElementsByTagName("fill")[0]; + opacity = fill.getAttribute('opacity'); + } t.eq(opacity, customStyle5.graphicOpacity, "graphicOpacity correctly set");