Index: runtime/observatory/lib/src/elements/nav/menu_wrapper.dart |
diff --git a/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart b/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart |
index b96fd0c935d45323466d59440e08104b007aa407..e0d32f9545dd01192b790c741df5c4f83582f367 100644 |
--- a/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart |
+++ b/runtime/observatory/lib/src/elements/nav/menu_wrapper.dart |
@@ -37,7 +37,7 @@ class NavMenuElementWrapper extends HtmlElement { |
binder.registerCallback(this); |
_anchor = getAttribute('anchor'); |
_link = getAttribute('link'); |
- _last = getAttribute('') != null; |
+ _last = _getBoolAttribute('last'); |
createShadowRoot(); |
render(); |
} |
@@ -58,4 +58,9 @@ class NavMenuElementWrapper extends HtmlElement { |
..children = [new ContentElement()] |
]; |
} |
+ |
+ bool _getBoolAttribute(String name) { |
+ final String value = getAttribute(name); |
+ return !(value == null || value == 'false'); |
+ } |
} |