Chromium Code Reviews| Index: client/html/src/SVGElementWrappingImplementation.dart |
| diff --git a/client/html/src/SVGElementWrappingImplementation.dart b/client/html/src/SVGElementWrappingImplementation.dart |
| index 2e5861792a5473be3760531d45402162bd1e84f9..a81b624baacc1a1b6a5a1b5bdf1819efd0108d4c 100644 |
| --- a/client/html/src/SVGElementWrappingImplementation.dart |
| +++ b/client/html/src/SVGElementWrappingImplementation.dart |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| @@ -29,7 +29,7 @@ class SVGElementWrappingImplementation extends ElementWrappingImplementation imp |
| } |
| parentTag.innerHTML = svg; |
| - if (parentTag.elements.length == 1) return parentTag.elements[0]; |
| + if (parentTag.elements.length == 1) return parentTag.elements.iterator().next(); |
|
nweiz
2012/02/02 19:01:11
Line length.
Why doesn't [0] work? Or #first?
zundel
2012/03/06 20:16:44
Because I didn't really fix the problem. I've fix
|
| throw new IllegalArgumentException('SVG had ${parentTag.elements.length} ' + |
| 'top-level elements but 1 expected'); |