Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Unified Diff: third_party/handlebar/handlebar.py

Issue 10545043: Extensions docs server: Design changes, partial template support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/handlebar/handlebar.py
diff --git a/third_party/handlebar/handlebar.py b/third_party/handlebar/handlebar.py
index d05e15e884fc49af7a149893bec18b6219b46443..83e88da71cd8665e9757abfdec88af0028da063f 100644
--- a/third_party/handlebar/handlebar.py
+++ b/third_party/handlebar/handlebar.py
@@ -82,7 +82,7 @@ class PathIdentifier(object):
def _resolveFrom(self, context):
result = context
for next in self.path:
- if not result or type(result) != dict:
+ if not result or not getattr(result, "get", None):
return None
result = result.get(next)
return result

Powered by Google App Engine
This is Rietveld 408576698