Prevent attempts to access what may be an empty list. Fixes #1832

pull/3/head
Surinder Kumar 2017-01-09 07:56:02 +05:30 committed by Dave Page
parent d87345ef52
commit d05534ad6c
1 changed files with 1 additions and 1 deletions

View File

@ -474,7 +474,7 @@ class PGChildNodeView(NodeView):
# Fetch the type name from the dictionary # Fetch the type name from the dictionary
# if type is not present in the types dictionary then # if type is not present in the types dictionary then
# we will continue and not going to add it. # we will continue and not going to add it.
if type_str[0] in types: if len(type_str) and type_str[0] in types:
# if type is present in the types dictionary, but it's # if type is present in the types dictionary, but it's
# value is None then it requires special handling. # value is None then it requires special handling.