Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Commit 0d4741c

Browse files
committed
try to show string length/array length only if it is set
1 parent b90e06f commit 0d4741c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pugdebug/gui/variables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ def add_variable(self, table, variable, parent=None):
9292
if type == 'object':
9393
type = variable['classname']
9494

95-
if type == 'array':
95+
if type == 'array' and 'numchildren' in variable:
9696
type = "%s {%d}" % (type, int(variable['numchildren']))
9797

98-
if type == 'string':
98+
if type == 'string' and 'size' in variable:
9999
type = "%s {%d}" % (type, int(variable['size']))
100100
tooltip = "Double click to inspect"
101101

0 commit comments

Comments
 (0)